Index: background.js |
=================================================================== |
--- a/background.js |
+++ b/background.js |
@@ -92,6 +92,8 @@ |
// See http://crbug.com/68705. |
var noStyleRulesHosts = ["mail.google.com", "mail.yahoo.com", "www.google.com"]; |
+var htmlPages = new ext.PageMap(); |
+ |
function removeDeprecatedOptions() |
{ |
var deprecatedOptions = ["specialCaseYouTube", "experimental", "disableInlineTextAds"]; |
@@ -138,7 +140,7 @@ |
// adblocking is active on that page |
page.contextMenus.removeAll(); |
- if (Prefs.shouldShowBlockElementMenu && !whitelisted && /^https?:/.test(page.url)) |
Thomas Greiner
2014/09/26 10:03:55
Checking for HTML pages should be done in addition
Sebastian Noack
2014/09/26 10:23:43
What's the point? When our content script, setting
|
+ if (Prefs.shouldShowBlockElementMenu && !whitelisted && htmlPages.has(page)) |
page.contextMenus.create(contextMenuItem); |
} |
@@ -560,6 +562,10 @@ |
case "add-sitekey": |
processKey(msg.token, sender.page, sender.frame); |
break; |
+ case "report-html-page": |
+ htmlPages.set(sender.page, null); |
+ refreshIconAndContextMenu(sender.page); |
+ break; |
case "forward": |
if (sender.page) |
{ |