From e6e38680803eaddda8764df4d777790b419c05c7 Mon Sep 17 00:00:00 2001 From: Deathamns Date: Sun, 9 Nov 2014 17:50:58 +0100 Subject: [PATCH] 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). --- src/js/vapi-common.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/js/vapi-common.js b/src/js/vapi-common.js index a44aa74..d8c0b4a 100644 --- a/src/js/vapi-common.js +++ b/src/js/vapi-common.js @@ -1,3 +1,4 @@ +// » header // could be used for background and other extension pages (function() { @@ -37,8 +38,10 @@ vAPI.download = function(details) { messager.close(); } }; +// « if (self.chrome) { + // » crx var chrome = self.chrome; vAPI.getURL = function(path) { @@ -50,7 +53,9 @@ if (self.chrome) { }; setScriptDirection(vAPI.i18n('@@ui_locale')); + // « } else if (self.safari) { + // » safariextz vAPI.getURL = function(path) { return safari.extension.baseURI + path; }; @@ -119,6 +124,8 @@ if (self.chrome) { } }); } + // « } - -})(); \ No newline at end of file +// » footer +})(); +// « \ No newline at end of file