Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: popup.js

Issue 29583568: Issue 5880 - Basic issue reporter implementation (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome
Patch Set: Created Oct. 19, 2017, 12:28 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « popup.html ('k') | skin/icons/checkbox.png » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"))
« no previous file with comments | « popup.html ('k') | skin/icons/checkbox.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld