Index: lib/child/contextMenu.js |
=================================================================== |
--- a/lib/child/contextMenu.js |
+++ b/lib/child/contextMenu.js |
@@ -115,26 +115,25 @@ function getContextInfo(event) |
return items; |
}; |
let ContextMenuObserver = |
{ |
observe: function(subject, topic, data) |
{ |
- if (topic == "content-contextmenu") |
- { |
- if (subject.wrappedJSObject) |
- subject = subject.wrappedJSObject; |
+ if (subject.wrappedJSObject) |
+ subject = subject.wrappedJSObject; |
- if (subject.addonInfo) |
- subject.addonInfo.adblockplus = getContextInfo(subject.event); |
- } |
+ if (subject.addonInfo) |
+ subject.addonInfo.adblockplus = getContextInfo(subject.event); |
}, |
QueryInterface: XPCOMUtils.generateQI([Ci.nsISupportsWeakReference, Ci.nsIObserver]) |
}; |
let addObserver = Utils.getPropertyWithoutCompatShims(Services.obs, "addObserver"); |
addObserver.call(Services.obs, ContextMenuObserver, "content-contextmenu", true); |
+addObserver.call(Services.obs, ContextMenuObserver, "AdblockPlus:content-contextmenu", true); |
onShutdown.add(() => { |
let removeObserver = Utils.getPropertyWithoutCompatShims(Services.obs, "removeObserver"); |
removeObserver.call(Services.obs, ContextMenuObserver, "content-contextmenu"); |
+ removeObserver.call(Services.obs, ContextMenuObserver, "AdblockPlus:content-contextmenu"); |
}); |