Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/ui.js

Issue 29329597: Issue 3253 - Adblock Warning List opt in message should not be triggered by frames (Firefox) (Closed)
Patch Set: Created Nov. 2, 2015, 11:41 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/notification.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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":
« no previous file with comments | « lib/notification.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld