aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Hill <rhill@raymondhill.net>2014-12-02 14:02:17 -0200
committerRaymond Hill <rhill@raymondhill.net>2014-12-02 14:02:17 -0200
commit0e1279770942df2f5b307d00dfe700ba9c3e7dcb (patch)
tree71a8d5f58c83e1926fe47f2cd308c9edab221a62
parent1a2eef4fa75b5e197cbe93c765394a6826142a52 (diff)
downloaduBlock-0e1279770942df2f5b307d00dfe700ba9c3e7dcb.zip
uBlock-0e1279770942df2f5b307d00dfe700ba9c3e7dcb.tar.gz
uBlock-0e1279770942df2f5b307d00dfe700ba9c3e7dcb.tar.bz2
extension restart is platform-dependent
-rw-r--r--platform/chromium/vapi-background.js6
-rw-r--r--platform/safari/vapi-background.js5
-rw-r--r--src/js/messaging.js4
-rw-r--r--src/js/xal.js8
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;
/******************************************************************************/