| 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-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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 ); | 170 ); |
| 171 } | 171 } |
| 172 } | 172 } |
| 173 ); | 173 ); |
| 174 } | 174 } |
| 175 | 175 |
| 176 function checkSitekey() | 176 function checkSitekey() |
| 177 { | 177 { |
| 178 var attr = document.documentElement.getAttribute("data-adblockkey"); | 178 var attr = document.documentElement.getAttribute("data-adblockkey"); |
| 179 if (attr) | 179 if (attr) |
| 180 ext.backgroundPage.sendMessage({type: "filter.addKey", token: attr}); | 180 ext.backgroundPage.sendMessage({type: "filters.addKey", token: attr}); |
| 181 } | 181 } |
| 182 | 182 |
| 183 function getContentDocument(element) | 183 function getContentDocument(element) |
| 184 { | 184 { |
| 185 try | 185 try |
| 186 { | 186 { |
| 187 return element.contentDocument; | 187 return element.contentDocument; |
| 188 } | 188 } |
| 189 catch (e) | 189 catch (e) |
| 190 { | 190 { |
| (...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 }, true); | 564 }, true); |
| 565 | 565 |
| 566 return updateStylesheet; | 566 return updateStylesheet; |
| 567 } | 567 } |
| 568 | 568 |
| 569 if (document instanceof HTMLDocument) | 569 if (document instanceof HTMLDocument) |
| 570 { | 570 { |
| 571 checkSitekey(); | 571 checkSitekey(); |
| 572 window.updateStylesheet = init(document); | 572 window.updateStylesheet = init(document); |
| 573 } | 573 } |
| OLD | NEW |