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

Unified 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: HTML fixes. Created May 4, 2018, 6:59 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: devtools-panel.js
===================================================================
--- a/devtools-panel.js
+++ b/devtools-panel.js
@@ -104,16 +104,24 @@
{
ext.devtools.panels.openResource(request.url);
event.preventDefault();
}
}, false);
}
}
+ if (request.rewrittenTo)
+ {
+ let rewrittenUrl = row.querySelector(".rewritten-to > a");
+ rewrittenUrl.textContent = request.rewrittenTo;
+ rewrittenUrl.setAttribute("href", request.rewrittenTo);
+ row.querySelector(".rewritten-to").removeAttribute("style");
+ }
+
if (filter)
{
let filterElement = row.querySelector(".filter");
let originElement = row.querySelector(".origin");
filterElement.textContent = filter.text;
row.dataset.state = filter.whitelisted ? "whitelisted" : "blocked";

Powered by Google App Engine
This is Rietveld