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

Delta Between Two Patch Sets: include.preload.js

Issue 29545645: Issue 5695 - Use tabs.insertCSS if extensionTypes.CSSOrigin exists (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Left Patch Set: Simplify further Created Sept. 17, 2017, 1:38 p.m.
Right Patch Set: Flatten out logic and remove blank line Created Sept. 20, 2017, 2:14 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | lib/cssInjection.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 494
495 if (this.style && this.style.parentElement) 495 if (this.style && this.style.parentElement)
496 this.style.parentElement.removeChild(this.style); 496 this.style.parentElement.removeChild(this.style);
497 this.style = null; 497 this.style = null;
498 498
499 if (response.trace) 499 if (response.trace)
500 this.tracer = new ElementHidingTracer(); 500 this.tracer = new ElementHidingTracer();
501 501
502 this.inject = response.inject; 502 this.inject = response.inject;
503 503
504 if (response.selectors) 504 if (this.inject)
Manish Jethani 2017/09/17 13:51:38 Check for the existence of response.selectors sinc
505 { 505 this.addSelectors(response.selectors);
506 if (this.inject) 506 else if (this.tracer)
507 this.addSelectors(response.selectors); 507 this.tracer.addSelectors(response.selectors);
508 else if (this.tracer)
509 this.tracer.addSelectors(response.selectors);
510 }
511 508
512 this.elemHideEmulation.apply(); 509 this.elemHideEmulation.apply();
513 }); 510 });
514 } 511 }
515 }; 512 };
516 513
517 if (document instanceof HTMLDocument) 514 if (document instanceof HTMLDocument)
518 { 515 {
519 checkSitekey(); 516 checkSitekey();
520 517
521 elemhide = new ElemHide(); 518 elemhide = new ElemHide();
522 elemhide.apply(); 519 elemhide.apply();
523 520
524 document.addEventListener("error", event => 521 document.addEventListener("error", event =>
525 { 522 {
526 checkCollapse(event.target); 523 checkCollapse(event.target);
527 }, true); 524 }, true);
528 525
529 document.addEventListener("load", event => 526 document.addEventListener("load", event =>
530 { 527 {
531 let element = event.target; 528 let element = event.target;
532 if (/^i?frame$/.test(element.localName)) 529 if (/^i?frame$/.test(element.localName))
533 checkCollapse(element); 530 checkCollapse(element);
534 }, true); 531 }, true);
535 } 532 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld