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

Side by Side Diff: include.preload.js

Issue 29705719: Issue 6402 - Split filter hit / request logging out into own API (Closed)
Patch Set: Nightmarish rebase Created April 13, 2018, 3:20 p.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 | « dependencies ('k') | lib/csp.js » ('j') | lib/devtools.js » ('J')
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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 243
244 break nodes; 244 break nodes;
245 } 245 }
246 } 246 }
247 } 247 }
248 } 248 }
249 249
250 if (selectors.length > 0 || filters.length > 0) 250 if (selectors.length > 0 || filters.length > 0)
251 { 251 {
252 browser.runtime.sendMessage({ 252 browser.runtime.sendMessage({
253 type: "devtools.traceElemHide", 253 type: "hitLogger.traceElemHide",
254 selectors, filters 254 selectors, filters
255 }); 255 });
256 } 256 }
257 }, 257 },
258 258
259 onTimeout() 259 onTimeout()
260 { 260 {
261 this.checkNodes(this.changedNodes, this.selectors); 261 this.checkNodes(this.changedNodes, this.selectors);
262 this.changedNodes = []; 262 this.changedNodes = [];
263 this.timeout = null; 263 this.timeout = null;
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 }, 487 },
488 488
489 hideElements(elements, filters) 489 hideElements(elements, filters)
490 { 490 {
491 for (let element of elements) 491 for (let element of elements)
492 hideElement(element); 492 hideElement(element);
493 493
494 if (this.tracer) 494 if (this.tracer)
495 { 495 {
496 browser.runtime.sendMessage({ 496 browser.runtime.sendMessage({
497 type: "devtools.traceElemHide", 497 type: "hitLogger.traceElemHide",
498 selectors: [], 498 selectors: [],
499 filters 499 filters
500 }); 500 });
501 } 501 }
502 }, 502 },
503 503
504 apply() 504 apply()
505 { 505 {
506 browser.runtime.sendMessage({type: "elemhide.getSelectors"}, response => 506 browser.runtime.sendMessage({type: "elemhide.getSelectors"}, response =>
507 { 507 {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 let element = event.target; 548 let element = event.target;
549 if (/^i?frame$/.test(element.localName)) 549 if (/^i?frame$/.test(element.localName))
550 checkCollapse(element); 550 checkCollapse(element);
551 }, true); 551 }, true);
552 } 552 }
553 553
554 window.checkCollapse = checkCollapse; 554 window.checkCollapse = checkCollapse;
555 window.elemhide = elemhide; 555 window.elemhide = elemhide;
556 window.typeMap = typeMap; 556 window.typeMap = typeMap;
557 window.getURLsFromElement = getURLsFromElement; 557 window.getURLsFromElement = getURLsFromElement;
OLDNEW
« no previous file with comments | « dependencies ('k') | lib/csp.js » ('j') | lib/devtools.js » ('J')

Powered by Google App Engine
This is Rietveld