| Index: include.preload.js |
| diff --git a/include.preload.js b/include.preload.js |
| index 7acdbb149870180bd26785a5fd8a7432da1db692..f3b22dcf1496e26d84a7007627c3a46ab3b669cb 100644 |
| --- a/include.preload.js |
| +++ b/include.preload.js |
| @@ -459,10 +459,15 @@ function init(document) |
| // |
| // Also, using shadow DOM causes issues on some Google websites, |
| // including Google Docs, Gmail and Blogger (#1770, #2602, #2687). |
| + // |
| + // Finally since some users have both AdBlock and Adblock Plus installed we |
| + // have to consider how the two extensions interact. For example we want to |
| + // avoid creating the shadowRoot twice. |
| if ("createShadowRoot" in document.documentElement && |
| !/\.(?:google|blogger)\.com$/.test(document.domain)) |
| { |
| - shadow = document.documentElement.createShadowRoot(); |
| + shadow = document.documentElement.shadowRoot || |
| + document.documentElement.createShadowRoot(); |
| shadow.appendChild(document.createElement("shadow")); |
| // Stop the website from messing with our shadowRoot |
| @@ -471,6 +476,8 @@ function init(document) |
| runInDocument(document, function() |
| { |
| var ourShadowRoot = document.documentElement.shadowRoot; |
| + if (!ourShadowRoot) |
| + return; |
| var desc = Object.getOwnPropertyDescriptor(Element.prototype, "shadowRoot"); |
| var shadowRoot = Function.prototype.call.bind(desc.get); |