Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: background.js

Issue 6393086494113792: Issue 154 - Added devtools panel showing blocked and blockable items (Closed)
Patch Set: Fixed issues in content script breaking element hide tracing Created Jan. 30, 2016, 6:19 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/devtools.html » ('j') | chrome/devtools.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
kzar 2016/01/31 13:33:50 Nit: Mind fixing this long line?
Sebastian Noack 2016/02/02 10:39:51 Done.
+ break;
case "forward":
if (sender.page)
{
« no previous file with comments | « no previous file | chrome/devtools.html » ('j') | chrome/devtools.js » ('J')

Powered by Google App Engine
This is Rietveld