Index: messageResponder.js |
=================================================================== |
--- a/messageResponder.js |
+++ b/messageResponder.js |
@@ -71,6 +71,7 @@ |
var changeListeners = new global.ext.PageMap(); |
var listenedPreferences = Object.create(null); |
var listenedFilterChanges = Object.create(null); |
+ var safariRestartRequired = null; |
var messageTypes = { |
"app": "app.respond", |
"filter": "filters.respond", |
@@ -189,6 +190,24 @@ |
break; |
case "app.listen": |
getListenerFilters(sender.page).app = message.filter; |
+ if (message.filter.indexOf("safariRestartRequired") != -1) |
+ { |
+ if (safariRestartRequired == null) |
+ { |
+ safariRestartRequired = false; |
+ Prefs.on("safari_contentblocker", function() |
+ { |
+ safariRestartRequired = !Prefs.safari_contentblocker; |
+ sendMessage("app", "safariRestartRequired", safariRestartRequired); |
+ }); |
+ } |
+ |
+ sender.page.sendMessage({ |
+ type: messageTypes.app, |
+ action: "safariRestartRequired", |
+ args: [safariRestartRequired] |
+ }); |
+ } |
break; |
case "app.open": |
if (message.what == "options") |