diff options
author | Deathamns <deathamns@gmail.com> | 2014-10-20 22:10:59 +0200 |
---|---|---|
committer | Deathamns <deathamns@gmail.com> | 2014-11-09 17:39:38 +0100 |
commit | 749b6f186d59c65655d49d5859900746b502cb84 (patch) | |
tree | ce0459ce0d8701bd4d29be675fcd7d69ed56f1da /src/js/assets.js | |
parent | fbffc5b07e1e9069e0a5427f1df1ae67f4e2a2e9 (diff) | |
download | uBlock-749b6f186d59c65655d49d5859900746b502cb84.zip uBlock-749b6f186d59c65655d49d5859900746b502cb84.tar.gz uBlock-749b6f186d59c65655d49d5859900746b502cb84.tar.bz2 |
Use a dedicated file for storing extension info
Chrome has getManifest(), Safari doesn't have anything, Firefox has an
asynchronous API...
So, instead of using extension APIs, store the common informations
(extension name, version, homepage url) in a file (vapi-appinfo.js), which
can be included when it's needed (its data will be available at vAPI.app.____).
The file's content is updated each time the extension is being built, so
it shouldn't be modified manually.
Diffstat (limited to 'src/js/assets.js')
-rw-r--r-- | src/js/assets.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/js/assets.js b/src/js/assets.js index 80dc0fe..6d8164b 100644 --- a/src/js/assets.js +++ b/src/js/assets.js @@ -97,7 +97,7 @@ var cachedAssetsManager = (function() { // Flush cached non-user assets if these are from a prior version. // https://github.com/gorhill/httpswitchboard/issues/212 var onLastVersionRead = function(store) { - var currentVersion = µBlock.version; + var currentVersion = vAPI.app.version; var lastVersion = store.extensionLastVersion || '0.0.0.0'; if ( currentVersion !== lastVersion ) { vAPI.storage.set({ 'extensionLastVersion': currentVersion }); |