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: Created Jan. 23, 2015, 9:47 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
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);
}
}
« chrome/ext/background.js ('K') | « chrome/ext/content.js ('k') | safari/ext/content.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld