Index: devtools-panel.js |
diff --git a/devtools-panel.js b/devtools-panel.js |
index 7fe190a73360b59fcee622a4a3b6f681d5995002..b9b231db646e69664a45370e30b750e915c2869e 100644 |
--- a/devtools-panel.js |
+++ b/devtools-panel.js |
@@ -84,19 +84,21 @@ function createRecord(request, filter, template) |
row.querySelector(".domain").textContent = request.docDomain; |
row.querySelector(".type").textContent = request.type; |
- let urlElement = row.querySelector(".url"); |
+ let urlElement = row.querySelector(".resource-link"); |
let actionWrapper = row.querySelector(".action-wrapper"); |
if (request.url) |
{ |
urlElement.textContent = request.url; |
+ urlElement.setAttribute("href", request.url); |
- if (request.type != "POPUP") |
+ // Firefox 57 doesn't support the openResource API. |
+ if (request.type != "POPUP" && "openResource" in ext.devtools.panels) |
{ |
- urlElement.classList.add("resourceLink"); |
- urlElement.addEventListener("click", () => |
+ urlElement.addEventListener("click", event => |
{ |
ext.devtools.panels.openResource(request.url); |
+ event.preventDefault(); |
Wladimir Palant
2017/11/14 15:22:40
Wait, won't this handle middle-clicks as well in C
kzar
2017/11/14 15:33:43
Well I just tested that and our event only fires f
|
}, false); |
} |
} |