| 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-present eyeo GmbH | 3 * Copyright (C) 2006-present 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 let options = []; | 42 let options = []; |
| 43 | 43 |
| 44 if (request.type == "POPUP") | 44 if (request.type == "POPUP") |
| 45 { | 45 { |
| 46 options.push("popup"); | 46 options.push("popup"); |
| 47 | 47 |
| 48 if (request.url == "about:blank") | 48 if (request.url == "about:blank") |
| 49 domainSpecific = true; | 49 domainSpecific = true; |
| 50 } | 50 } |
| 51 | 51 |
| 52 if (request.type == "CSP") |
| 53 options.push("csp"); |
| 54 |
| 52 if (domainSpecific) | 55 if (domainSpecific) |
| 53 options.push("domain=" + request.docDomain); | 56 options.push("domain=" + request.docDomain); |
| 54 | 57 |
| 55 if (options.length > 0) | 58 if (options.length > 0) |
| 56 filter += "$" + options.join(","); | 59 filter += "$" + options.join(","); |
| 57 | 60 |
| 58 return filter; | 61 return filter; |
| 59 } | 62 } |
| 60 | 63 |
| 61 function createActionButton(action, label, filter) | 64 function createActionButton(action, label, filter) |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 break; | 258 break; |
| 256 } | 259 } |
| 257 }); | 260 }); |
| 258 | 261 |
| 259 // Since Chrome 54 the themeName is accessible, for earlier versions we must | 262 // Since Chrome 54 the themeName is accessible, for earlier versions we must |
| 260 // assume the default theme is being used. | 263 // assume the default theme is being used. |
| 261 // https://bugs.chromium.org/p/chromium/issues/detail?id=608869 | 264 // https://bugs.chromium.org/p/chromium/issues/detail?id=608869 |
| 262 let theme = browser.devtools.panels.themeName || "default"; | 265 let theme = browser.devtools.panels.themeName || "default"; |
| 263 document.body.classList.add(theme); | 266 document.body.classList.add(theme); |
| 264 }, false); | 267 }, false); |
| OLD | NEW |