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

Side by Side Diff: lib/devtools.js

Issue 29737561: Issue 6539, 6782 - Implement support for snippets (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Use JSON.stringify Created March 31, 2018, 8:06 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | lib/requestBlocker.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-present eyeo GmbH 3 * Copyright (C) 2006-present eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 10 matching lines...) Expand all
21 WhitelistFilter, 21 WhitelistFilter,
22 ElemHideFilter} = require("filterClasses"); 22 ElemHideFilter} = require("filterClasses");
23 const {SpecialSubscription} = require("subscriptionClasses"); 23 const {SpecialSubscription} = require("subscriptionClasses");
24 const {FilterStorage} = require("filterStorage"); 24 const {FilterStorage} = require("filterStorage");
25 const {defaultMatcher} = require("matcher"); 25 const {defaultMatcher} = require("matcher");
26 const {FilterNotifier} = require("filterNotifier"); 26 const {FilterNotifier} = require("filterNotifier");
27 const {extractHostFromFrame} = require("url"); 27 const {extractHostFromFrame} = require("url");
28 const {port} = require("messaging"); 28 const {port} = require("messaging");
29 29
30 const nonRequestTypes = ["DOCUMENT", "ELEMHIDE", 30 const nonRequestTypes = ["DOCUMENT", "ELEMHIDE",
31 "GENERICBLOCK", "GENERICHIDE", "CSP"]; 31 "GENERICBLOCK", "GENERICHIDE",
32 "CSP", "SNIPPET"];
32 33
33 // Mapping of inspected tabs to their devpanel page 34 // Mapping of inspected tabs to their devpanel page
34 // and recorded items. We can't use a PageMap here, 35 // and recorded items. We can't use a PageMap here,
35 // because data must persist after navigation/reload. 36 // because data must persist after navigation/reload.
36 let panels = new Map(); 37 let panels = new Map();
37 38
38 function isActivePanel(panel) 39 function isActivePanel(panel)
39 { 40 {
40 return panel && !panel.reload && !panel.reloading; 41 return panel && !panel.reload && !panel.reloading;
41 } 42 }
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 panels.set(inspectedTabId, {port: newPort, records: []}); 379 panels.set(inspectedTabId, {port: newPort, records: []});
379 }); 380 });
380 381
381 port.on("devtools.traceElemHide", (message, sender) => 382 port.on("devtools.traceElemHide", (message, sender) =>
382 { 383 {
383 logHiddenElements( 384 logHiddenElements(
384 sender.page, message.selectors, message.filters, 385 sender.page, message.selectors, message.filters,
385 extractHostFromFrame(sender.frame) 386 extractHostFromFrame(sender.frame)
386 ); 387 );
387 }); 388 });
OLDNEW
« no previous file with comments | « no previous file | lib/requestBlocker.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld