| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 403 var propertyFilters = new CSSPropertyFilters(window, addElemHideSelectors); | 403 var propertyFilters = new CSSPropertyFilters(window, addElemHideSelectors); |
| 404 | 404 |
| 405 // Use Shadow DOM if available to don't mess with web pages that rely on | 405 // Use Shadow DOM if available to don't mess with web pages that rely on |
| 406 // the order of their own <style> tags (#309). | 406 // the order of their own <style> tags (#309). |
| 407 // | 407 // |
| 408 // However, creating a shadow root breaks running CSS transitions. So we | 408 // However, creating a shadow root breaks running CSS transitions. So we |
| 409 // have to create the shadow root before transistions might start (#452). | 409 // have to create the shadow root before transistions might start (#452). |
| 410 // | 410 // |
| 411 // Also, using shadow DOM causes issues on some Google websites, | 411 // Also, using shadow DOM causes issues on some Google websites, |
| 412 // including Google Docs, Gmail and Blogger (#1770, #2602, #2687). | 412 // including Google Docs, Gmail and Blogger (#1770, #2602, #2687). |
| 413 if ("createShadowRoot" in document.documentElement && !/\.(?:google|blogger)\. com$/.test(document.domain)) | 413 if ("createShadowRoot" in document.documentElement && |
|
kzar
2016/03/19 15:16:59
Nit: Mind fixing this long line?
Sebastian Noack
2016/03/19 15:20:11
Done.
| |
| 414 !/\.(?:google|blogger)\.com$/.test(document.domain)) | |
| 414 { | 415 { |
| 415 shadow = document.documentElement.createShadowRoot(); | 416 shadow = document.documentElement.createShadowRoot(); |
| 416 shadow.appendChild(document.createElement("shadow")); | 417 shadow.appendChild(document.createElement("shadow")); |
| 417 } | 418 } |
| 418 | 419 |
| 419 function addElemHideSelectors(selectors) | 420 function addElemHideSelectors(selectors) |
| 420 { | 421 { |
| 421 if (selectors.length == 0) | 422 if (selectors.length == 0) |
| 422 return; | 423 return; |
| 423 | 424 |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 551 }, true); | 552 }, true); |
| 552 | 553 |
| 553 return updateStylesheet; | 554 return updateStylesheet; |
| 554 } | 555 } |
| 555 | 556 |
| 556 if (document instanceof HTMLDocument) | 557 if (document instanceof HTMLDocument) |
| 557 { | 558 { |
| 558 checkSitekey(); | 559 checkSitekey(); |
| 559 window.updateStylesheet = init(document); | 560 window.updateStylesheet = init(document); |
| 560 } | 561 } |
| LEFT | RIGHT |