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

Unified Diff: include.postload.js

Issue 5186743326212096: Issue 1843 - Deactivate "Block element" dialog when extension is disabled/uninstalled/reloaded (Closed)
Patch Set: Re-phrased comment Created Jan. 26, 2015, 4:11 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 | « chrome/ext/content.js ('k') | safari/ext/content.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include.postload.js
===================================================================
--- a/include.postload.js
+++ b/include.postload.js
@@ -358,6 +358,8 @@
document.addEventListener("mouseout", clickHide_mouseOut, true);
document.addEventListener("click", clickHide_mouseClick, true);
document.addEventListener("keydown", clickHide_keyDown, true);
+
+ ext.onExtensionUnloaded.addListener(clickHide_deactivate);
}
// Called when user has clicked on something and we are waiting for confirmation
@@ -388,7 +390,7 @@
document.removeEventListener("click", clickHide_mouseClick, true);
document.removeEventListener("keydown", clickHide_keyDown, true);
- if (!keepOverlays)
+ if (keepOverlays !== true)
{
lastRightClickEvent = null;
@@ -403,6 +405,8 @@
var overlays = document.getElementsByClassName("__adblockplus__overlay");
while (overlays.length > 0)
overlays[0].parentNode.removeChild(overlays[0]);
+
+ ext.onExtensionUnloaded.removeListener(clickHide_deactivate);
}
}
« no previous file with comments | « chrome/ext/content.js ('k') | safari/ext/content.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld