OLD | NEW |
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 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 // Using shadow DOM causes issues on some Google websites, | 367 // Using shadow DOM causes issues on some Google websites, |
368 // including Google Docs, Gmail and Blogger (#1770, #2602, #2687). | 368 // including Google Docs, Gmail and Blogger (#1770, #2602, #2687). |
369 if (/\.(?:google|blogger)\.com$/.test(document.domain)) | 369 if (/\.(?:google|blogger)\.com$/.test(document.domain)) |
370 return null; | 370 return null; |
371 | 371 |
372 // Finally since some users have both AdBlock and Adblock Plus installed we | 372 // Finally since some users have both AdBlock and Adblock Plus installed we |
373 // have to consider how the two extensions interact. For example we want to | 373 // have to consider how the two extensions interact. For example we want to |
374 // avoid creating the shadowRoot twice. | 374 // avoid creating the shadowRoot twice. |
375 let shadow = document.documentElement.shadowRoot || | 375 let shadow = document.documentElement.shadowRoot || |
376 document.documentElement.createShadowRoot(); | 376 document.documentElement.createShadowRoot(); |
377 shadow.appendChild(document.createElement("shadow")); | 377 shadow.appendChild(document.createElement("content")); |
378 | 378 |
379 return shadow; | 379 return shadow; |
380 }, | 380 }, |
381 | 381 |
382 addSelectorsInline(selectors, groupName) | 382 addSelectorsInline(selectors, groupName) |
383 { | 383 { |
384 let style = this.styles.get(groupName); | 384 let style = this.styles.get(groupName); |
385 | 385 |
386 if (style) | 386 if (style) |
387 { | 387 { |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 let element = event.target; | 541 let element = event.target; |
542 if (/^i?frame$/.test(element.localName)) | 542 if (/^i?frame$/.test(element.localName)) |
543 checkCollapse(element); | 543 checkCollapse(element); |
544 }, true); | 544 }, true); |
545 } | 545 } |
546 | 546 |
547 window.checkCollapse = checkCollapse; | 547 window.checkCollapse = checkCollapse; |
548 window.elemhide = elemhide; | 548 window.elemhide = elemhide; |
549 window.typeMap = typeMap; | 549 window.typeMap = typeMap; |
550 window.getURLsFromElement = getURLsFromElement; | 550 window.getURLsFromElement = getURLsFromElement; |
OLD | NEW |