aboutsummaryrefslogtreecommitdiff
path: root/html/display_panel/content/main_panel.js
diff options
context:
space:
mode:
authorYuchen Pei <hi@ypei.me>2022-10-12 19:11:20 +1100
committerYuchen Pei <hi@ypei.me>2022-10-12 19:11:20 +1100
commitb849b8d461479cf6530c77b97b094807840ce0d7 (patch)
treea5b59fbce035d698011d9b55e6e88dae4b1f65d4 /html/display_panel/content/main_panel.js
parent88fa677b51b6b1eb814866ea08129a6b7cda9ddb (diff)
adding force display noscript.
Diffstat (limited to 'html/display_panel/content/main_panel.js')
-rw-r--r--html/display_panel/content/main_panel.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/html/display_panel/content/main_panel.js b/html/display_panel/content/main_panel.js
index 7a5e2c3..dc3ee2d 100644
--- a/html/display_panel/content/main_panel.js
+++ b/html/display_panel/content/main_panel.js
@@ -83,17 +83,24 @@ document.querySelector("#info").addEventListener("click", e => {
myPort.postMessage({ [action]: entry, site, tabId: currentReport.tabId });
});
-document.querySelector("#report-tab").onclick = e => {
+document.querySelector("#report-tab").onclick = _ => {
myPort.postMessage({ report_tab: currentReport });
close();
}
-document.querySelector("#complain").onclick = e => {
+document.querySelector("#complain").onclick = _ => {
myPort.postMessage({ invoke_contact_finder: currentReport });
close();
}
-document.querySelector("#open-options").onclick = e => {
+document.querySelector("#force-noscript").onclick = async _ => {
+ await browser.tabs.sendMessage(currentReport.tabId, {
+ action: 'forceNoscript'
+ });
+ document.querySelector("#force-noscript").disabled = true;
+}
+
+document.querySelector("#open-options").onclick = _ => {
browser.runtime.openOptionsPage();
close();
}