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-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 var shadow = null; | 188 var shadow = null; |
189 var style = null; | 189 var style = null; |
190 var observer = null; | 190 var observer = null; |
191 | 191 |
192 // Use Shadow DOM if available to don't mess with web pages that rely on | 192 // Use Shadow DOM if available to don't mess with web pages that rely on |
193 // the order of their own <style> tags (#309). | 193 // the order of their own <style> tags (#309). |
194 // | 194 // |
195 // However, creating a shadow root breaks running CSS transitions. So we | 195 // However, creating a shadow root breaks running CSS transitions. So we |
196 // have to create the shadow root before transistions might start (#452). | 196 // have to create the shadow root before transistions might start (#452). |
197 // | 197 // |
198 // Also, we can't use shadow DOM on Google Docs, since it breaks printing | 198 // Also, we can't use shadow DOM on Google Docs since it breaks printing |
199 // there (#1770). | 199 // there (#1770), and Google Mail since the feedback from breaks the layout |
200 if ("createShadowRoot" in document.documentElement && document.domain != "docs
.google.com") | 200 // there when using shadow DOM (#2602). |
| 201 if ("createShadowRoot" in document.documentElement |
| 202 && document.domain != "docs.google.com" |
| 203 && document.domain != "mail.google.com") |
201 { | 204 { |
202 shadow = document.documentElement.createShadowRoot(); | 205 shadow = document.documentElement.createShadowRoot(); |
203 shadow.appendChild(document.createElement("shadow")); | 206 shadow.appendChild(document.createElement("shadow")); |
204 } | 207 } |
205 | 208 |
206 var updateStylesheet = function(reinject) | 209 var updateStylesheet = function(reinject) |
207 { | 210 { |
208 ext.backgroundPage.sendMessage({type: "get-selectors"}, function(selectors) | 211 ext.backgroundPage.sendMessage({type: "get-selectors"}, function(selectors) |
209 { | 212 { |
210 if (observer) | 213 if (observer) |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 }, true); | 298 }, true); |
296 | 299 |
297 return updateStylesheet; | 300 return updateStylesheet; |
298 } | 301 } |
299 | 302 |
300 if (document instanceof HTMLDocument) | 303 if (document instanceof HTMLDocument) |
301 { | 304 { |
302 checkSitekey(); | 305 checkSitekey(); |
303 window.updateStylesheet = init(document); | 306 window.updateStylesheet = init(document); |
304 } | 307 } |
OLD | NEW |