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

Delta Between Two Patch Sets: 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/
Left Patch Set: Created May 4, 2018, 6:28 p.m.
Right Patch Set: Some CSS style fixes. Created May 17, 2018, 2:12 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « devtools-panel.html ('k') | skin/devtools-panel.css » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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) 112 if (request.rewrittenUrl)
113 { 113 {
114 let rewrittenUrl = row.querySelector(".rewritten-to > a"); 114 let rewrittenUrl = row.querySelector(".rewritten-url > a");
115 rewrittenUrl.textContent = request.rewrittenTo; 115 rewrittenUrl.textContent = request.rewrittenUrl;
116 rewrittenUrl.setAttribute("href", request.rewrittenTo); 116 rewrittenUrl.setAttribute("href", request.rewrittenUrl);
117 row.querySelector(".rewritten-to").removeAttribute("style"); 117 row.querySelector(".rewritten-url").removeAttribute("hidden");
118 } 118 }
119 119
120 if (filter) 120 if (filter)
121 { 121 {
122 let filterElement = row.querySelector(".filter"); 122 let filterElement = row.querySelector(".filter");
123 let originElement = row.querySelector(".origin"); 123 let originElement = row.querySelector(".origin");
124 124
125 filterElement.textContent = filter.text; 125 filterElement.textContent = filter.text;
126 row.dataset.state = filter.whitelisted ? "whitelisted" : "blocked"; 126 row.dataset.state = filter.whitelisted ? "whitelisted" : "blocked";
127 127
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 break; 266 break;
267 } 267 }
268 }); 268 });
269 269
270 // 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
271 // assume the default theme is being used. 271 // assume the default theme is being used.
272 // https://bugs.chromium.org/p/chromium/issues/detail?id=608869 272 // https://bugs.chromium.org/p/chromium/issues/detail?id=608869
273 let theme = browser.devtools.panels.themeName || "default"; 273 let theme = browser.devtools.panels.themeName || "default";
274 document.body.classList.add(theme); 274 document.body.classList.add(theme);
275 }, false); 275 }, false);
LEFTRIGHT

Powered by Google App Engine
This is Rietveld