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

Unified Diff: lib/child/contextMenu.js

Issue 29331700: Issue 3223 - Implement context menu fallback for SeaMonkey Mail and Thunderbird (Closed)
Patch Set: Changed notification name Created Dec. 2, 2015, 11:20 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 | « no previous file | lib/ui.js » ('j') | lib/ui.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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");
});
« no previous file with comments | « no previous file | lib/ui.js » ('j') | lib/ui.js » ('J')

Powered by Google App Engine
This is Rietveld