| |
@@ -94,13 +94,14 @@
|
| |
close();
|
| |
}
|
| |
|
| |
- document.querySelector("#reload").onclick = async e => {
|
| |
+ document.body.addEventListener("click", async e => {
|
| |
+ if (!e.target.matches(".reload")) return;
|
| |
let {tabId} = currentReport;
|
| |
if (tabId) {
|
| |
await browser.tabs.reload(tabId);
|
| |
myPort.postMessage({"update": true, tabId});
|
| |
}
|
| |
- };
|
| |
+ });
|
| |
|
| |
/*
|
| |
* Takes in the [[file_id, reason],...] array and the group name for one group
|
| |
As requested by Ruben, here we add to the popup UI a permanent reload button, other than the one showing up when LibreJS cannot determine the status of a script which has just been removed either by the whitelist or the blacklist until the page is actually reloaded.
The best place I could think of has been the buttons line on the "whole site" section (first report line), but since the event handler is wired quite flexibly, moving around and/or restyling the button is really easy, provided that the "reload" CSS class is retained.