Index: background.js |
=================================================================== |
--- a/background.js |
+++ b/background.js |
@@ -53,6 +53,7 @@ |
var updateIcon = require("icon").updateIcon; |
var initNotifications = require("notificationHelper").initNotifications; |
var showNextNotificationForUrl = require("notificationHelper").showNextNotificationForUrl; |
+var devtools = require("devtools"); |
var seenDataCorruption = false; |
var filterlistsReinitialized = false; |
@@ -285,6 +286,7 @@ |
{ |
case "get-selectors": |
var selectors = []; |
+ var trace = devtools && devtools.hasPanel(sender.page); |
if (!isFrameWhitelisted(sender.page, sender.frame, |
RegExpFilter.typeMap.DOCUMENT | RegExpFilter.typeMap.ELEMHIDE)) |
@@ -313,7 +315,7 @@ |
} |
} |
- sendResponse(selectors); |
+ sendResponse({selectors: selectors, trace: trace}); |
break; |
case "should-collapse": |
if (isFrameWhitelisted(sender.page, sender.frame, RegExpFilter.typeMap.DOCUMENT)) |
@@ -393,6 +395,9 @@ |
frame: sender.frame |
})); |
break; |
+ case "trace-elemhide": |
+ devtools.logHiddenElements(sender.page, msg.selectors, extractHostFromFrame(sender.frame)); |
+ break; |
case "forward": |
if (sender.page) |
{ |