| 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 | 149 |
| 150 if (lastFilterQuery && shouldFilterRow(row, lastFilterQuery)) | 150 if (lastFilterQuery && shouldFilterRow(row, lastFilterQuery)) |
| 151 row.classList.add("filtered-by-search"); | 151 row.classList.add("filtered-by-search"); |
| 152 | 152 |
| 153 return row; | 153 return row; |
| 154 } | 154 } |
| 155 | 155 |
| 156 function shouldFilterRow(row, query) | 156 function shouldFilterRow(row, query) |
| 157 { | 157 { |
| 158 let elementsToSearch = [ | 158 let elementsToSearch = [ |
| 159 row.getElementsByClassName("url"), | 159 row.getElementsByClassName("resource-link"), |
| 160 row.getElementsByClassName("filter"), | 160 row.getElementsByClassName("filter"), |
| 161 row.getElementsByClassName("origin"), | 161 row.getElementsByClassName("origin"), |
| 162 row.getElementsByClassName("type") | 162 row.getElementsByClassName("type") |
| 163 ]; | 163 ]; |
| 164 | 164 |
| 165 for (let elements of elementsToSearch) | 165 for (let elements of elementsToSearch) |
| 166 { | 166 { |
| 167 for (let element of elements) | 167 for (let element of elements) |
| 168 { | 168 { |
| 169 if (element.innerText.search(query) != -1) | 169 if (element.innerText.search(query) != -1) |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 break; | 255 break; |
| 256 } | 256 } |
| 257 }); | 257 }); |
| 258 | 258 |
| 259 // Since Chrome 54 the themeName is accessible, for earlier versions we must | 259 // Since Chrome 54 the themeName is accessible, for earlier versions we must |
| 260 // assume the default theme is being used. | 260 // assume the default theme is being used. |
| 261 // https://bugs.chromium.org/p/chromium/issues/detail?id=608869 | 261 // https://bugs.chromium.org/p/chromium/issues/detail?id=608869 |
| 262 let theme = browser.devtools.panels.themeName || "default"; | 262 let theme = browser.devtools.panels.themeName || "default"; |
| 263 document.body.classList.add(theme); | 263 document.body.classList.add(theme); |
| 264 }, false); | 264 }, false); |
| OLD | NEW |