Index: lib/ui.js |
=================================================================== |
--- a/lib/ui.js |
+++ b/lib/ui.js |
@@ -459,6 +459,24 @@ |
notificationTimer.initWithCallback(this.showNextNotification.bind(this), |
3 * 60 * 1000, Ci.nsITimer.TYPE_ONE_SHOT); |
onShutdown.add(function() notificationTimer.cancel()); |
+ |
+ // Add "anti-adblock messages" notification |
+ initAntiAdblockNotification(); |
+ |
+ let documentCreationObserver = { |
+ observe: function(subject, topic, data) |
+ { |
+ if (!(subject instanceof Ci.nsIDOMWindow)) |
+ return; |
+ |
+ this.showNextNotification(subject.location.href); |
+ }.bind(UI) |
+ }; |
+ Services.obs.addObserver(documentCreationObserver, "content-document-global-created", false); |
+ onShutdown.add(function() |
+ { |
+ Services.obs.removeObserver(documentCreationObserver, "content-document-global-created", false); |
+ }); |
}, |
/** |
@@ -531,24 +549,6 @@ |
window.document.getElementById("abp-notification").hidePopup(); |
}, false); |
- // Add "anti-adblock messages" notification |
- initAntiAdblockNotification(); |
- |
- let documentCreationObserver = { |
- observe: function(subject, topic, data) |
- { |
- if (!(subject instanceof Ci.nsIDOMWindow)) |
- return; |
- |
- this.showNextNotification(subject.location.href); |
- }.bind(UI) |
- }; |
- Services.obs.addObserver(documentCreationObserver, "content-document-global-created", false); |
- onShutdown.add(function() |
- { |
- Services.obs.removeObserver(documentCreationObserver, "content-document-global-created", false); |
- }); |
- |
// First-run actions? |
if (!this.firstRunDone) |
{ |