Index: devtools-panel.js |
=================================================================== |
--- a/devtools-panel.js |
+++ b/devtools-panel.js |
@@ -66,17 +66,17 @@ |
button.classList.add("action"); |
button.addEventListener("click", () => |
{ |
chrome.runtime.sendMessage({ |
type: "filters." + action, |
text: filter |
}); |
- }, false); |
+ }); |
return button; |
} |
function createRecord(request, filter, template) |
{ |
let row = document.importNode(template, true); |
row.dataset.type = request.type; |
@@ -91,18 +91,18 @@ |
{ |
urlElement.textContent = request.url; |
if (request.type != "POPUP") |
{ |
urlElement.classList.add("resourceLink"); |
urlElement.addEventListener("click", () => |
{ |
- ext.devtools.panels.openResource(request.url); |
- }, false); |
+ chrome.devtools.panels.openResource(request.url); |
+ }); |
} |
} |
if (filter) |
{ |
let filterElement = row.querySelector(".filter"); |
let originElement = row.querySelector(".origin"); |
@@ -188,28 +188,28 @@ |
document.addEventListener("DOMContentLoaded", () => |
{ |
let container = document.getElementById("items"); |
let table = container.querySelector("tbody"); |
let template = document.querySelector("template").content.firstElementChild; |
document.getElementById("reload").addEventListener("click", () => |
{ |
- ext.devtools.inspectedWindow.reload(); |
- }, false); |
+ chrome.devtools.inspectedWindow.reload(); |
+ }); |
document.getElementById("filter-state").addEventListener("change", (event) => |
{ |
container.dataset.filterState = event.target.value; |
- }, false); |
+ }); |
document.getElementById("filter-type").addEventListener("change", (event) => |
{ |
container.dataset.filterType = event.target.value; |
- }, false); |
+ }); |
ext.onMessage.addListener((message) => |
{ |
switch (message.type) |
{ |
case "add-record": |
table.appendChild(createRecord(message.request, message.filter, |
template)); |
@@ -251,9 +251,9 @@ |
} |
}); |
// Since Chrome 54 the themeName is accessible, for earlier versions we must |
// assume the default theme is being used. |
// https://bugs.chromium.org/p/chromium/issues/detail?id=608869 |
let theme = chrome.devtools.panels.themeName || "default"; |
document.body.classList.add(theme); |
-}, false); |
+}); |