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

Side by Side Diff: lib/hitLogger.js

Issue 29865587: Issue 6843 - Log snippet filter hits (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Rebased and addressed comments Created Aug. 27, 2018, 12:56 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 | « lib/contentFiltering.js ('k') | 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
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details. 12 * GNU General Public License for more details.
13 * 13 *
14 * You should have received a copy of the GNU General Public License 14 * You should have received a copy of the GNU General Public License
15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. 15 * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
16 */ 16 */
17 17
18 /** @module hitLogger */ 18 /** @module hitLogger */
19 19
20 "use strict"; 20 "use strict";
21 21
22 const {extractHostFromFrame} = require("./url"); 22 const {extractHostFromFrame} = require("./url");
23 const {EventEmitter} = require("../adblockpluscore/lib/events"); 23 const {EventEmitter} = require("../adblockpluscore/lib/events");
24 const {FilterStorage} = require("../adblockpluscore/lib/filterStorage"); 24 const {FilterStorage} = require("../adblockpluscore/lib/filterStorage");
25 const {port} = require("./messaging"); 25 const {port} = require("./messaging");
26 const {RegExpFilter, 26 const {RegExpFilter,
27 ElemHideFilter} = require("../adblockpluscore/lib/filterClasses"); 27 ElemHideFilter} = require("../adblockpluscore/lib/filterClasses");
28 28
29 const nonRequestTypes = exports.nonRequestTypes = [ 29 const nonRequestTypes = exports.nonRequestTypes = [
30 "DOCUMENT", "ELEMHIDE", "GENERICBLOCK", "GENERICHIDE", "CSP" 30 "DOCUMENT", "ELEMHIDE", "SNIPPET", "GENERICBLOCK", "GENERICHIDE", "CSP"
31 ]; 31 ];
32 32
33 let eventEmitter = new EventEmitter(); 33 let eventEmitter = new EventEmitter();
34 34
35 /** 35 /**
36 * @namespace 36 * @namespace
37 * @static 37 * @static
38 */ 38 */
39 let HitLogger = exports.HitLogger = { 39 let HitLogger = exports.HitLogger = {
40 /** 40 /**
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 } 154 }
155 }; 155 };
156 156
157 port.on("hitLogger.traceElemHide", (message, sender) => 157 port.on("hitLogger.traceElemHide", (message, sender) =>
158 { 158 {
159 logHiddenElements( 159 logHiddenElements(
160 sender.page.id, message.selectors, message.filters, 160 sender.page.id, message.selectors, message.filters,
161 extractHostFromFrame(sender.frame) 161 extractHostFromFrame(sender.frame)
162 ); 162 );
163 }); 163 });
OLDNEW
« no previous file with comments | « lib/contentFiltering.js ('k') | lib/requestBlocker.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld