Index: popup.js |
=================================================================== |
--- a/popup.js |
+++ b/popup.js |
@@ -123,16 +123,23 @@ function cancelClickHide() |
{ |
window.clearTimeout(activateClickHide.timeout); |
activateClickHide.timeout = null; |
} |
document.body.classList.remove("clickhide-active"); |
browser.tabs.sendMessage(tab.id, {type: "composer.content.finished"}); |
} |
+function reportIssue() |
+{ |
+ browser.tabs.create({ |
+ url: browser.runtime.getURL("/issue-reporter.html?" + tab.id) |
+ }); |
+} |
+ |
function toggleCollapse(event) |
{ |
let collapser = event.currentTarget; |
let collapsible = document.getElementById(collapser.dataset.collapsible); |
collapsible.classList.toggle("collapsed"); |
togglePref(collapser.dataset.option); |
} |
@@ -304,16 +311,19 @@ document.addEventListener("DOMContentLoa |
"click", toggleEnabled |
); |
document.getElementById("clickhide").addEventListener( |
"click", activateClickHide |
); |
document.getElementById("clickhide-cancel").addEventListener( |
"click", cancelClickHide |
); |
+ document.getElementById("issueReporter").addEventListener( |
+ "click", reportIssue |
+ ) |
document.getElementById("options").addEventListener("click", () => |
{ |
browser.runtime.sendMessage({type: "app.open", what: "options"}); |
window.close(); |
}); |
// Set up collapsing of menu items |
for (let collapser of document.getElementsByClassName("collapse")) |