From f128d868d319c45222e451af75e3aa397b7f8144 Mon Sep 17 00:00:00 2001 From: hackademix Date: Mon, 8 Apr 2019 18:37:54 +0200 Subject: Add permanent reload button in the popup UI (in the "whole site" information line). --- html/display_panel/content/main_panel.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'html/display_panel/content/main_panel.js') diff --git a/html/display_panel/content/main_panel.js b/html/display_panel/content/main_panel.js index 83c3a6b..85c9474 100644 --- a/html/display_panel/content/main_panel.js +++ b/html/display_panel/content/main_panel.js @@ -94,13 +94,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 -- cgit v1.2.3