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

Unified Diff: lib/cssInjection.js

Issue 29705719: Issue 6402 - Split filter hit / request logging out into own API (Closed)
Patch Set: Addressed Sebastian's feedback Created March 21, 2018, 3:14 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 | « include.preload.js ('k') | lib/devtools.js » ('j') | lib/devtools.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/cssInjection.js
diff --git a/lib/cssInjection.js b/lib/cssInjection.js
index 85094174b014978c0c0f8653e10527f956cd79c9..eb6c4e0aa3e662917586300fe9be1e9c344fefc8 100644
--- a/lib/cssInjection.js
+++ b/lib/cssInjection.js
@@ -25,7 +25,7 @@ const {ElemHideEmulation} = require("elemHideEmulation");
const {checkWhitelisted} = require("whitelisting");
const {extractHostFromFrame} = require("url");
const {port} = require("messaging");
-const devtools = require("devtools");
+const {hasListener} = require("hitLogger");
const info = require("info");
// Chromium's support for tabs.removeCSS is still a work in progress and the
@@ -141,7 +141,7 @@ port.on("elemhide.getSelectors", (message, sender) =>
{
let selectors = [];
let emulatedPatterns = [];
- let trace = devtools && devtools.hasPanel(sender.page);
+ let trace = hasListener(sender.page.id);
let inline = !userStyleSheetsSupported;
if (!checkWhitelisted(sender.page, sender.frame,
« no previous file with comments | « include.preload.js ('k') | lib/devtools.js » ('j') | lib/devtools.js » ('J')

Powered by Google App Engine
This is Rietveld