| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <http://adblockplus.org/>, | 2 * This file is part of Adblock Plus <http://adblockplus.org/>, |
| 3 * Copyright (C) 2006-2014 Eyeo GmbH | 3 * Copyright (C) 2006-2014 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 55 } | 55 } |
| 56 } | 56 } |
| 57 ); | 57 ); |
| 58 } | 58 } |
| 59 } | 59 } |
| 60 | 60 |
| 61 function checkSitekey() | 61 function checkSitekey() |
| 62 { | 62 { |
| 63 var attr = document.documentElement.getAttribute("data-adblockkey"); | 63 var attr = document.documentElement.getAttribute("data-adblockkey"); |
| 64 if (attr) | 64 if (attr) |
| 65 ext.backgroundPage.sendMessage({type: "add-sitekey", sitekey: attr}); | 65 ext.backgroundPage.sendMessage({type: "add-sitekey", token: attr}); |
|
Wladimir Palant
2014/09/10 18:27:04
IMHO, the parameter name "token" is better left as
Thomas Greiner
2014/09/15 09:24:59
Done.
| |
| 66 } | 66 } |
| 67 | 67 |
| 68 function hasInlineURL(element, attribute) | 68 function hasInlineURL(element, attribute) |
| 69 { | 69 { |
| 70 var value = element.getAttribute(attribute); | 70 var value = element.getAttribute(attribute); |
| 71 return value == null || /^\s*(javascript:|about:|$)/i.test(value); | 71 return value == null || /^\s*(javascript:|about:|$)/i.test(value); |
| 72 } | 72 } |
| 73 | 73 |
| 74 function isInlineFrame(element) | 74 function isInlineFrame(element) |
| 75 { | 75 { |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 199 }, true); | 199 }, true); |
| 200 | 200 |
| 201 ext.backgroundPage.sendMessage({type: "get-selectors"}, setElemhideCSSRules); | 201 ext.backgroundPage.sendMessage({type: "get-selectors"}, setElemhideCSSRules); |
| 202 } | 202 } |
| 203 | 203 |
| 204 if (document instanceof HTMLDocument) | 204 if (document instanceof HTMLDocument) |
| 205 { | 205 { |
| 206 checkSitekey(); | 206 checkSitekey(); |
| 207 init(document); | 207 init(document); |
| 208 } | 208 } |
| LEFT | RIGHT |