Index: background.js |
=================================================================== |
--- a/background.js |
+++ b/background.js |
@@ -35,6 +35,11 @@ |
this.processKey = processKey; |
this.getKey = getKey; |
} |
+with(require("devtools")) |
+{ |
+ this.hasPanel = hasPanel; |
+ this.logHiddenElements = logHiddenElements; |
+} |
var FilterStorage = require("filterStorage").FilterStorage; |
var ElemHide = require("elemHide").ElemHide; |
var defaultMatcher = require("matcher").defaultMatcher; |
@@ -496,7 +501,7 @@ |
} |
} |
- sendResponse(selectors); |
+ sendResponse({selectors: selectors, trace: hasPanel(sender.page)}); |
break; |
case "should-collapse": |
if (isFrameWhitelisted(sender.page, sender.frame, "DOCUMENT")) |
@@ -558,6 +563,9 @@ |
htmlPages.set(sender.page, null); |
refreshIconAndContextMenu(sender.page); |
break; |
+ case "trace-elemhide": |
+ logHiddenElements(sender.page._id, msg.selectors, extractHostFromFrame(sender.frame)); |
+ break; |
case "forward": |
if (sender.page) |
{ |