mirror of
https://github.com/gorhill/uMatrix.git
synced 2024-06-28 11:00:38 +12:00
Building extension files
Adds possibility to build extension files (Chrome and Safari) from command line. To run from the project directory: python tools/build.py [meta] If the optional `meta` argument is set, then only the manifest and language files are uptated. Without that everything is being built (extension files too) into the `dist/build/version_number` folder. For Chrome there will be two files, a crx, and a .zip file which includes the key.pem private key (so this must not be shared, it's just a bit help for publishing it to the Chrome Web Store). Beside the extension files, update-files are generated too (for self hosting - Safari needs it).
This commit is contained in:
parent
29eabd44fd
commit
8eb76e880c
|
@ -1,3 +1,4 @@
|
|||
// » header
|
||||
/* global SafariBrowserTab, Services, XPCOMUtils */
|
||||
// for background page only
|
||||
|
||||
|
@ -5,8 +6,10 @@
|
|||
'use strict';
|
||||
|
||||
self.vAPI = self.vAPI || {};
|
||||
// «
|
||||
|
||||
if (self.chrome) {
|
||||
// » crx
|
||||
var chrome = self.chrome;
|
||||
|
||||
vAPI.chrome = true;
|
||||
|
@ -272,7 +275,9 @@ if (self.chrome) {
|
|||
chrome.contextMenus.remove(this.menuId);
|
||||
}
|
||||
};
|
||||
// «
|
||||
} else if (self.safari) {
|
||||
// » safariextz
|
||||
vAPI.safari = true;
|
||||
|
||||
// addContentScriptFromURL allows whitelisting,
|
||||
|
@ -888,9 +893,13 @@ if (self.chrome) {
|
|||
this.onContextMenuCommand = null;
|
||||
}
|
||||
};
|
||||
// «
|
||||
}
|
||||
|
||||
// » footer
|
||||
|
||||
if (!self.chrome) {
|
||||
self.chrome = { runtime: { lastError: null } };
|
||||
}
|
||||
})();
|
||||
// «
|
||||
|
|
Loading…
Reference in a new issue