| Index: lib/ui.js |
| =================================================================== |
| --- a/lib/ui.js |
| +++ b/lib/ui.js |
| @@ -439,31 +439,16 @@ let UI = exports.UI = |
| return; |
| this._showNotification(window, button, notification); |
| }); |
| // Add "anti-adblock messages" notification |
| initAntiAdblockNotification(); |
| - let documentCreationObserver = { |
| - observe: function(subject, topic, data) |
| - { |
| - if (!(subject instanceof Ci.nsIDOMWindow)) |
| - return; |
| - |
| - Notification.showNext(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); |
| - }); |
| - |
| // Frame script URL has to be randomized due to caching |
| // (see https://bugzilla.mozilla.org/show_bug.cgi?id=1051238) |
| let frameScript = "chrome://adblockplus/content/subscribeLinkHandler.js?" + Math.random(); |
| // Initialize subscribe link handling |
| let callback = this.subscribeLinkClicked.bind(this); |
| let messageManager = Cc["@mozilla.org/globalmessagemanager;1"] |
| .getService(Ci.nsIMessageListenerManager); |
| @@ -603,16 +588,18 @@ let UI = exports.UI = |
| } |
| window.addEventListener("popupshowing", this.onPopupShowing, false); |
| window.addEventListener("keypress", this.onKeyPress, false); |
| addBrowserLocationListener(window, function() |
| { |
| this.updateIconState(window, window.document.getElementById("abp-status")); |
| this.updateIconState(window, window.document.getElementById("abp-toolbarbutton")); |
| + |
| + Notification.showNext(this.getCurrentLocation(window).spec); |
|
Thomas Greiner
2015/11/02 12:42:52
Detail: Not directly related to this ticket but ac
Wladimir Palant
2015/11/02 13:34:24
Actually, getCurrentLocation in appSupport.js *can
|
| }.bind(this)); |
| let notificationPanel = window.document.getElementById("abp-notification"); |
| notificationPanel.addEventListener("command", function(event) |
| { |
| switch (event.target.id) |
| { |
| case "abp-notification-close": |