diff options
author | Alessio Vanni <vannilla@firemail.cc> | 2019-06-22 00:43:52 +0200 |
---|---|---|
committer | Alessio Vanni <vannilla@firemail.cc> | 2019-06-22 00:43:52 +0200 |
commit | 5befab2b81270d55e5cb45ed39756dd9c069cf1f (patch) | |
tree | e7feae67e4f84d25c79ec15877ec5ad5b2b54b11 | |
parent | 149164fed6a978ddc515107641cc29f5527340ae (diff) | |
download | ematrix-5befab2b81270d55e5cb45ed39756dd9c069cf1f.tar.lz ematrix-5befab2b81270d55e5cb45ed39756dd9c069cf1f.tar.xz ematrix-5befab2b81270d55e5cb45ed39756dd9c069cf1f.zip |
Move more entities to core
-rw-r--r-- | js/vapi-background.js | 31 | ||||
-rw-r--r-- | js/vapi-core.js | 31 |
2 files changed, 31 insertions, 31 deletions
diff --git a/js/vapi-background.js b/js/vapi-background.js index 4cfebb8..b7d0d65 100644 --- a/js/vapi-background.js +++ b/js/vapi-background.js @@ -35,27 +35,6 @@ const {Services} = Cu.import('resource://gre/modules/Services.jsm', null); let vAPI = self.vAPI; // Guaranteed to be initialized by vapi-core.js - - vAPI.modernFirefox = - Services.appinfo.ID === '{ec8030f7-c20a-464f-9b0e-13a3a9e97384}' - && Services.vc.compare(Services.appinfo.version, '44') > 0; - - vAPI.app = { - name: 'eMatrix', - version: location.hash.slice(1), - - start: function () { - return; - }, - stop: function () { - return; - }, - restart: function () { - Cc['@mozilla.org/childprocessmessagemanager;1'] - .getService(Ci.nsIMessageSender) - .sendAsyncMessage(location.host + '-restart'); - }, - }; vAPI.browserSettings = { // For now, only booleans. @@ -548,12 +527,6 @@ return null; }; - vAPI.noTabId = '-1'; - - vAPI.isBehindTheSceneTabId = function (tabId) { - return tabId.toString() === '-1'; - }; - // Icon-related stuff vAPI.setIcon = function (tabId, iconId, badge) { // If badge is undefined, then setIcon was called from the @@ -2236,10 +2209,6 @@ optionsObserver.register(); - vAPI.lastError = function () { - return null; - }; - vAPI.onLoadAllCompleted = function() { // This is called only once, when everything has been loaded // in memory after the extension was launched. It can be used diff --git a/js/vapi-core.js b/js/vapi-core.js index bc7bcb9..4ab5216 100644 --- a/js/vapi-core.js +++ b/js/vapi-core.js @@ -34,6 +34,27 @@ const {Services} = Cu.import('resource://gre/modules/Services.jsm', null); let vAPI = self.vAPI = self.vAPI || {}; + + vAPI.modernFirefox = + Services.appinfo.ID === '{ec8030f7-c20a-464f-9b0e-13a3a9e97384}' + && Services.vc.compare(Services.appinfo.version, '44') > 0; + + vAPI.app = { + name: 'eMatrix', + version: location.hash.slice(1), + + start: function () { + return; + }, + stop: function () { + return; + }, + restart: function () { + Cc['@mozilla.org/childprocessmessagemanager;1'] + .getService(Ci.nsIMessageSender) + .sendAsyncMessage(location.host + '-restart'); + }, + }; // List of things that needs to be destroyed when disabling the extension // Only functions should be added to it @@ -106,4 +127,14 @@ frameModule.contentObserver.unregister(); Cu.unload(frameModuleURL); }); + + vAPI.noTabId = '-1'; + + vAPI.isBehindTheSceneTabId = function (tabId) { + return tabId.toString() === '-1'; + }; + + vAPI.lastError = function () { + return null; + }; })(); |