diff options
-rw-r--r-- | platform/chromium/vapi-background.js | 6 | ||||
-rw-r--r-- | platform/safari/vapi-background.js | 5 | ||||
-rw-r--r-- | src/js/messaging.js | 4 | ||||
-rw-r--r-- | src/js/xal.js | 8 |
4 files changed, 13 insertions, 10 deletions
diff --git a/platform/chromium/vapi-background.js b/platform/chromium/vapi-background.js index 6243fd1..74c656b 100644 --- a/platform/chromium/vapi-background.js +++ b/platform/chromium/vapi-background.js @@ -48,6 +48,12 @@ vAPI.app = { /******************************************************************************/ +vAPI.app.restart = function() { + chrome.runtime.reload(); +}; + +/******************************************************************************/ + vAPI.storage = chrome.storage.local; /******************************************************************************/ diff --git a/platform/safari/vapi-background.js b/platform/safari/vapi-background.js index 9a662f2..376bc33 100644 --- a/platform/safari/vapi-background.js +++ b/platform/safari/vapi-background.js @@ -43,6 +43,11 @@ vAPI.app = { /******************************************************************************/ +vAPI.app.restart = function() { +}; + +/******************************************************************************/ + // addContentScriptFromURL allows whitelisting, // so load sitepaching this way, instead of adding it to the Info.plist diff --git a/src/js/messaging.js b/src/js/messaging.js index 9ce4374..03ca7e7 100644 --- a/src/js/messaging.js +++ b/src/js/messaging.js @@ -752,7 +752,7 @@ var restoreUserData = function(userData) { var onCountdown = function() { countdown -= 1; if ( countdown === 0 ) { - µb.XAL.restart(); + vAPI.app.restart(); } }; @@ -776,7 +776,7 @@ var resetUserData = function() { µb.XAL.keyvalRemoveAll(); // Keep global counts, people can become quite attached to numbers µBlock.saveLocalSettings(); - µb.XAL.restart(); + vAPI.app.restart(); }; /******************************************************************************/ diff --git a/src/js/xal.js b/src/js/xal.js index 45fc67f..6d3366b 100644 --- a/src/js/xal.js +++ b/src/js/xal.js @@ -54,14 +54,6 @@ exports.keyvalRemoveAll = function(callback) { /******************************************************************************/ -exports.restart = function() { - if (vAPI.chrome) { - chrome.runtime.reload(); - } -}; - -/******************************************************************************/ - return exports; /******************************************************************************/ |