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

Side by Side Diff: include.preload.js

Issue 29570614: Issue 5028 - Use browser namespace (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Created Oct. 9, 2017, 3:12 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
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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 434
435 addSelectors(selectors, filters) 435 addSelectors(selectors, filters)
436 { 436 {
437 if (selectors.length == 0) 437 if (selectors.length == 0)
438 return; 438 return;
439 439
440 if (this.inject) 440 if (this.inject)
441 { 441 {
442 // Insert the style rules inline if we have been instructed by the 442 // Insert the style rules inline if we have been instructed by the
443 // background page to do so. This is usually the case, except on platforms 443 // background page to do so. This is usually the case, except on platforms
444 // that do support user stylesheets via the chrome.tabs.insertCSS API 444 // that do support user stylesheets via the browser.tabs.insertCSS API
445 // (Firefox 53 onwards for now and possibly Chrome in the near future). 445 // (Firefox 53 onwards for now and possibly Chrome in the near future).
446 // Once all supported platforms have implemented this API, we can remove 446 // Once all supported platforms have implemented this API, we can remove
447 // the code below. See issue #5090. 447 // the code below. See issue #5090.
448 // Related Chrome and Firefox issues: 448 // Related Chrome and Firefox issues:
449 // https://bugs.chromium.org/p/chromium/issues/detail?id=632009 449 // https://bugs.chromium.org/p/chromium/issues/detail?id=632009
450 // https://bugzilla.mozilla.org/show_bug.cgi?id=1310026 450 // https://bugzilla.mozilla.org/show_bug.cgi?id=1310026
451 this.injectSelectors(selectors, filters); 451 this.injectSelectors(selectors, filters);
452 } 452 }
453 else 453 else
454 { 454 {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 checkCollapse(event.target); 516 checkCollapse(event.target);
517 }, true); 517 }, true);
518 518
519 document.addEventListener("load", event => 519 document.addEventListener("load", event =>
520 { 520 {
521 let element = event.target; 521 let element = event.target;
522 if (/^i?frame$/.test(element.localName)) 522 if (/^i?frame$/.test(element.localName))
523 checkCollapse(element); 523 checkCollapse(element);
524 }, true); 524 }, true);
525 } 525 }
OLDNEW

Powered by Google App Engine
This is Rietveld