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

Side by Side Diff: devtools-panel.js

Issue 29770586: Issue 6670 - Display the rewritten to info if applicable in the devtools (Closed) Base URL: https://hg.adblockplus.org/adblockplusui/
Patch Set: Created May 4, 2018, 6:28 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
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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 { 102 {
103 if (event.button == 0) 103 if (event.button == 0)
104 { 104 {
105 ext.devtools.panels.openResource(request.url); 105 ext.devtools.panels.openResource(request.url);
106 event.preventDefault(); 106 event.preventDefault();
107 } 107 }
108 }, false); 108 }, false);
109 } 109 }
110 } 110 }
111 111
112 if (request.rewrittenTo)
113 {
114 let rewrittenUrl = row.querySelector(".rewritten-to > a");
115 rewrittenUrl.textContent = request.rewrittenTo;
116 rewrittenUrl.setAttribute("href", request.rewrittenTo);
117 row.querySelector(".rewritten-to").removeAttribute("style");
118 }
119
112 if (filter) 120 if (filter)
113 { 121 {
114 let filterElement = row.querySelector(".filter"); 122 let filterElement = row.querySelector(".filter");
115 let originElement = row.querySelector(".origin"); 123 let originElement = row.querySelector(".origin");
116 124
117 filterElement.textContent = filter.text; 125 filterElement.textContent = filter.text;
118 row.dataset.state = filter.whitelisted ? "whitelisted" : "blocked"; 126 row.dataset.state = filter.whitelisted ? "whitelisted" : "blocked";
119 127
120 if (filter.subscription) 128 if (filter.subscription)
121 originElement.textContent = filter.subscription; 129 originElement.textContent = filter.subscription;
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 break; 266 break;
259 } 267 }
260 }); 268 });
261 269
262 // Since Chrome 54 the themeName is accessible, for earlier versions we must 270 // Since Chrome 54 the themeName is accessible, for earlier versions we must
263 // assume the default theme is being used. 271 // assume the default theme is being used.
264 // https://bugs.chromium.org/p/chromium/issues/detail?id=608869 272 // https://bugs.chromium.org/p/chromium/issues/detail?id=608869
265 let theme = browser.devtools.panels.themeName || "default"; 273 let theme = browser.devtools.panels.themeName || "default";
266 document.body.classList.add(theme); 274 document.body.classList.add(theme);
267 }, false); 275 }, false);
OLDNEW
« devtools-panel.html ('K') | « devtools-panel.html ('k') | skin/devtools-panel.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld