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: Created Nov. 17, 2016, 1:17 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
« lib/child/utils.js ('K') | « lib/main.js ('k') | no next file » | 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");
Wladimir Palant 2016/11/17 13:54:48 The menu item used to indicate if Element Hiding H
saroyanm 2016/11/23 17:44:39 Acknowledged.
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);
}
};
« lib/child/utils.js ('K') | « lib/main.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld