Index: background.js |
=================================================================== |
--- a/background.js |
+++ b/background.js |
@@ -41,6 +41,11 @@ |
this.isThirdParty = isThirdParty; |
this.extractHostFromFrame = extractHostFromFrame; |
} |
+with(require("devtools")) |
+{ |
+ this.hasDevToolsPanel = hasDevToolsPanel; |
+ this.logHiddenElements = logHiddenElements; |
+} |
var FilterStorage = require("filterStorage").FilterStorage; |
var ElemHide = require("elemHide").ElemHide; |
var defaultMatcher = require("matcher").defaultMatcher; |
@@ -497,7 +502,7 @@ |
} |
} |
- sendResponse(selectors); |
+ sendResponse({selectors: selectors, trace: hasDevToolsPanel(sender.page)}); |
break; |
case "should-collapse": |
if (isFrameWhitelisted(sender.page, sender.frame, "DOCUMENT")) |
@@ -562,6 +567,9 @@ |
htmlPages.set(sender.page, null); |
refreshIconAndContextMenu(sender.page); |
break; |
+ case "trace-elemhide": |
+ logHiddenElements(sender.page, msg.selectors, extractHostFromFrame(sender.frame)); |
+ break; |
case "forward": |
if (sender.page) |
{ |