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

Unified Diff: lib/windowWrapper.js

Issue 29363476: Issue 2879 - Move element selection into the content process (Closed) Base URL: https://hg.adblockplus.org/elemhidehelper
Patch Set: Addressed comments and marked extension as E10S-compatible Created Nov. 24, 2016, 2 p.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/main.js ('k') | metadata.gecko » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/windowWrapper.js
===================================================================
--- a/lib/windowWrapper.js
+++ b/lib/windowWrapper.js
@@ -75,25 +75,22 @@ WindowWrapper.prototype =
popupShowingHandler: function(event)
{
let popup = event.originalTarget;
if (!/^(abp-(?:toolbar|status|menuitem)-)popup$/.test(popup.id))
return;
this.popupHiddenHandler(event);
- let enabled = Aardvark.canSelect(this.browser);
- let running = (enabled && this.browser == Aardvark.browser);
+ let running = this.browser == Aardvark.browser;
let [labelStart, labelStop] = getMenuItem();
let item = popup.ownerDocument.createElement("menuitem");
item.setAttribute("label", running ? labelStop : labelStart);
item.setAttribute("class", "elemhidehelper-item");
- if (!enabled)
- item.setAttribute("disabled", "true");
if (typeof key == "undefined")
this.configureKey(event.currentTarget);
item.setAttribute("acceltext", KeySelector.getTextForKey(key));
item.addEventListener("command", this.toggleSelection, false);
let insertBefore = null;
@@ -137,11 +134,11 @@ WindowWrapper.prototype =
Aardvark.hideTooltips();
},
toggleSelection: function()
{
if ("@adblockplus.org/abp/public;1" in Cc && this.browser != Aardvark.browser)
Aardvark.start(this);
else
- Aardvark.quit();
+ Aardvark.doCommand("quit", null);
}
};
« no previous file with comments | « lib/main.js ('k') | metadata.gecko » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld