aboutsummaryrefslogtreecommitdiff
path: root/html/display_panel/content/main_panel.js
diff options
context:
space:
mode:
authorRuben Rodriguez <ruben@gnu.org>2018-10-03 22:23:57 +0000
committerRuben Rodriguez <ruben@gnu.org>2018-10-03 22:23:57 +0000
commitdcba303f8d172f6748225d2e00f28a44ac13c453 (patch)
treed03607192a35e21a65fe1972f57bc273c53a25bb /html/display_panel/content/main_panel.js
parent5461a48cbeac01d5f8bc31a10d11ff72a295c7d9 (diff)
parent12bfe0f9fdad5bfea680d897c81319684ee82180 (diff)
Merge #25 `Adding automated test suite`
Diffstat (limited to 'html/display_panel/content/main_panel.js')
-rw-r--r--html/display_panel/content/main_panel.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/html/display_panel/content/main_panel.js b/html/display_panel/content/main_panel.js
index c55b167..2509545 100644
--- a/html/display_panel/content/main_panel.js
+++ b/html/display_panel/content/main_panel.js
@@ -38,6 +38,18 @@ myPort.postMessage({"update": true, tabId: parseInt(currentReport && currentRepo
// Display the actual extension version Number
document.querySelector("#version").textContent = browser.runtime.getManifest().version;
+// Enable autotest button if this is a test-enabled build / session
+(async () => {
+ if (await Test.getURL()) {
+ let button = document.querySelector("#autotest");
+ button.style.display = "block";
+ button.onclick = async () => {
+ await Test.getTab(true);
+ close();
+ }
+ }
+})();
+
var liTemplate = document.querySelector("#li-template");
liTemplate.remove();