diff options
Diffstat (limited to 'html/display_panel')
-rw-r--r-- | html/display_panel/content/display-panel.html | 2 | ||||
-rw-r--r-- | html/display_panel/content/main_panel.js | 12 | ||||
-rw-r--r-- | html/display_panel/content/panel-styles.css | 3 |
3 files changed, 16 insertions, 1 deletions
diff --git a/html/display_panel/content/display-panel.html b/html/display_panel/content/display-panel.html index df153b3..80f4cb9 100644 --- a/html/display_panel/content/display-panel.html +++ b/html/display_panel/content/display-panel.html @@ -53,6 +53,7 @@ <button id="complain">Complain to site owner</button> <button id="report-tab">Show this report in a new tab</button> <button id="open-options">Settings...</button> + <button id="autotest">Automated self test...</button> </div> </div> <div id="info"> @@ -100,5 +101,6 @@ </div> </div> </body> +<script src="/common/Test.js"></script> <script src="main_panel.js"></script> </html> 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(); diff --git a/html/display_panel/content/panel-styles.css b/html/display_panel/content/panel-styles.css index 0d849e4..940a8ff 100644 --- a/html/display_panel/content/panel-styles.css +++ b/html/display_panel/content/panel-styles.css @@ -141,7 +141,8 @@ span.blocked { display: none; } -.tab #must-reload, .tab #buttons, .empty #buttons { +.tab #must-reload, .tab #buttons, +.empty #complain, .empty #report-tab, #autotest { display: none; } |