| 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-2017 eyeo GmbH | 3  * Copyright (C) 2006-2017 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 15 matching lines...) Expand all  Loading... | 
| 26 | 26 | 
| 27 function getDocLink(link, callback) | 27 function getDocLink(link, callback) | 
| 28 { | 28 { | 
| 29   ext.backgroundPage.sendMessage({ | 29   ext.backgroundPage.sendMessage({ | 
| 30     type: "app.get", | 30     type: "app.get", | 
| 31     what: "doclink", | 31     what: "doclink", | 
| 32     link | 32     link | 
| 33   }, callback); | 33   }, callback); | 
| 34 } | 34 } | 
| 35 | 35 | 
|  | 36 function setLinks(id, ...args) | 
|  | 37   { | 
|  | 38     let element = E(id); | 
|  | 39     if (!element) | 
|  | 40     { | 
|  | 41       return; | 
|  | 42     } | 
|  | 43 | 
|  | 44     let links = element.getElementsByTagName("a"); | 
|  | 45 | 
|  | 46     for (let i = 0; i < links.length; i++) | 
|  | 47     { | 
|  | 48       if (typeof args[i] == "string") | 
|  | 49       { | 
|  | 50         links[i].href = args[i]; | 
|  | 51         links[i].setAttribute("target", "_blank"); | 
|  | 52       } | 
|  | 53       else if (typeof args[i] == "function") | 
|  | 54       { | 
|  | 55         links[i].href = "javascript:void(0);"; | 
|  | 56         links[i].addEventListener("click", args[i], false); | 
|  | 57       } | 
|  | 58     } | 
|  | 59   } | 
|  | 60 | 
| 36 function checkShareResource(url, callback) | 61 function checkShareResource(url, callback) | 
| 37 { | 62 { | 
| 38   ext.backgroundPage.sendMessage({ | 63   ext.backgroundPage.sendMessage({ | 
| 39     type: "filters.blocked", | 64     type: "filters.blocked", | 
| 40     url, | 65     url, | 
| 41     requestType: "SCRIPT", | 66     requestType: "SCRIPT", | 
| 42     docDomain: "adblockplus.org", | 67     docDomain: "adblockplus.org", | 
| 43     thirdParty: true | 68     thirdParty: true | 
| 44   }, callback); | 69   }, callback); | 
| 45 } | 70 } | 
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 145       window.removeEventListener("message", popupMessageListener); | 170       window.removeEventListener("message", popupMessageListener); | 
| 146     } | 171     } | 
| 147 | 172 | 
| 148     iframe.removeEventListener("load", popupLoadListener); | 173     iframe.removeEventListener("load", popupLoadListener); | 
| 149   }; | 174   }; | 
| 150   iframe.addEventListener("load", popupLoadListener, false); | 175   iframe.addEventListener("load", popupLoadListener, false); | 
| 151 | 176 | 
| 152   iframe.src = url; | 177   iframe.src = url; | 
| 153   glassPane.className = "visible"; | 178   glassPane.className = "visible"; | 
| 154 } | 179 } | 
| OLD | NEW | 
|---|