aboutsummaryrefslogtreecommitdiff
path: root/html
diff options
context:
space:
mode:
Diffstat (limited to 'html')
-rw-r--r--html/display_panel/content/display-panel.html3
-rw-r--r--html/display_panel/content/main_panel.js5
2 files changed, 5 insertions, 3 deletions
diff --git a/html/display_panel/content/display-panel.html b/html/display_panel/content/display-panel.html
index 2e705ab..7d1fdf5 100644
--- a/html/display_panel/content/display-panel.html
+++ b/html/display_panel/content/display-panel.html
@@ -65,12 +65,13 @@
<button class="whitelist" name="*">Whitelist</button>
<button class="blacklist" name="*">Blacklist</button>
<button class="forget" name="*">Forget</button>
+ <button id="reload" class="reload">Reload</button>
</div>
</div>
<div id="unknown" class="unknown-js">
<h2></h2>
<p id="must-reload">
- LibreJS will decide whether blocking these scripts next time this page is loaded. <button id="reload">Reload it now</button>
+ LibreJS will decide whether blocking these scripts next time this page is loaded. <button class="reload" id="reload-now">Reload it now</button>
</p>
<ul>
<li id="li-template">
diff --git a/html/display_panel/content/main_panel.js b/html/display_panel/content/main_panel.js
index 32d1bda..b96143b 100644
--- a/html/display_panel/content/main_panel.js
+++ b/html/display_panel/content/main_panel.js
@@ -98,13 +98,14 @@ document.querySelector("#open-options").onclick = e => {
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