Index: background.js |
=================================================================== |
--- a/background.js |
+++ b/background.js |
@@ -46,6 +46,11 @@ |
this.startIconAnimation = startIconAnimation; |
this.stopIconAnimation = stopIconAnimation; |
} |
+with(require("devtools")) |
+{ |
+ this.hasDevToolsPanel = hasDevToolsPanel; |
+ this.logHiddenElements = logHiddenElements; |
+} |
var FilterStorage = require("filterStorage").FilterStorage; |
var ElemHide = require("elemHide").ElemHide; |
var defaultMatcher = require("matcher").defaultMatcher; |
@@ -487,7 +492,7 @@ |
} |
} |
- sendResponse(selectors); |
+ sendResponse({selectors: selectors, trace: hasDevToolsPanel(sender.page)}); |
break; |
case "should-collapse": |
if (isFrameWhitelisted(sender.page, sender.frame, "DOCUMENT")) |
@@ -557,6 +562,8 @@ |
msg.tagName, msg.id, msg.src, msg.style, |
msg.classes, msg.urls, new URL(msg.baseURL) |
)); |
+ case "trace-elemhide": |
+ logHiddenElements(sender.page, msg.selectors, extractHostFromFrame(sender.frame)); |
break; |
case "forward": |
if (sender.page) |