aboutsummaryrefslogtreecommitdiff
path: root/html/display_panel/content/main_panel.js
diff options
context:
space:
mode:
Diffstat (limited to 'html/display_panel/content/main_panel.js')
-rw-r--r--html/display_panel/content/main_panel.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/html/display_panel/content/main_panel.js b/html/display_panel/content/main_panel.js
index 9172265..75de6aa 100644
--- a/html/display_panel/content/main_panel.js
+++ b/html/display_panel/content/main_panel.js
@@ -173,8 +173,8 @@ function createList(data, group){
*/
function refreshUI(report) {
currentReport = report;
-
- document.querySelector("#site").className = report.siteStatus || "";
+ let {siteStatus, listedSite} = report;
+ document.querySelector("#site").className = siteStatus || "";
document.querySelector("#site h2").textContent =
`This site ${report.site}`;
@@ -198,6 +198,15 @@ function refreshUI(report) {
b.disabled = true;
}
+ if (siteStatus && siteStatus !== "unknown") {
+ let statusLabel = siteStatus;
+ if (listedSite && listedSite !== report.site) statusLabel += ` via ${listedSite}`;
+ let status = document.querySelector("#site .status");
+ status.classList.add(siteStatus);
+ document.querySelector("#site .status").textContent = statusLabel;
+ document.querySelector("#site .forget").disabled = true;
+ }
+
let noscript = scriptsCount === 0;
document.body.classList.toggle("empty", noscript);
}