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

Side by Side Diff: lib/child/requestNotifier.js

Issue 29364102: Issue 4658 - Incorporate element hiding emulation filters (Closed) Base URL: https://bitbucket.org/fhd/adblockplus
Patch Set: Change minVersion back and improve error message Created Dec. 13, 2016, 3:52 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/child/main.js ('k') | lib/elemHideEmulation.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-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 windowStats.set(topWnd.document, { 355 windowStats.set(topWnd.document, {
356 items: 0, 356 items: 0,
357 hidden: 0, 357 hidden: 0,
358 blocked: 0, 358 blocked: 0,
359 whitelisted: 0, 359 whitelisted: 0,
360 filters: {} 360 filters: {}
361 }); 361 });
362 } 362 }
363 363
364 let stats = windowStats.get(topWnd.document); 364 let stats = windowStats.get(topWnd.document);
365 if (filterType != "elemhide" && filterType != "elemhideexception" && filterTyp e != "cssproperty") 365 if (filterType != "elemhide" && filterType != "elemhideexception" && filterTyp e != "elemhideemulation")
366 stats.items++; 366 stats.items++;
367 if (filter) 367 if (filter)
368 { 368 {
369 if (filterType == "blocking") 369 if (filterType == "blocking")
370 stats.blocked++; 370 stats.blocked++;
371 else if (filterType == "whitelist" || filterType == "elemhideexception") 371 else if (filterType == "whitelist" || filterType == "elemhideexception")
372 stats.whitelisted++; 372 stats.whitelisted++;
373 else if (filterType == "elemhide" || filterType == "cssproperty") 373 else if (filterType == "elemhide" || filterType == "elemhideemulation")
374 stats.hidden++; 374 stats.hidden++;
375 375
376 if (filter in stats.filters) 376 if (filter in stats.filters)
377 stats.filters[filter]++; 377 stats.filters[filter]++;
378 else 378 else
379 stats.filters[filter] = 1; 379 stats.filters[filter] = 1;
380 } 380 }
381 381
382 // Notify listeners 382 // Notify listeners
383 for (let notifier of notifiers.values()) 383 for (let notifier of notifiers.values())
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 node = node.parentNode; 435 node = node.parentNode;
436 } 436 }
437 else 437 else
438 { 438 {
439 node = null; 439 node = null;
440 } 440 }
441 } 441 }
442 442
443 return null; 443 return null;
444 }; 444 };
OLDNEW
« no previous file with comments | « lib/child/main.js ('k') | lib/elemHideEmulation.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld