Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: devtools-panel.js

Issue 29616579: Issue 6084 - Use new classname for devtools request URL filtering (Closed)
Patch Set: Created Nov. 23, 2017, 4:04 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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);
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld