aboutsummaryrefslogtreecommitdiff
path: root/html/display_panel/content
diff options
context:
space:
mode:
authorhackademix <giorgio@maone.net>2019-03-26 22:45:37 +0100
committerhackademix <giorgio@maone.net>2019-03-26 22:45:37 +0100
commit9884643742b54b88f94111d62f5e89a12a60e604 (patch)
treef367f5b7aa7ae3b950c26a946b54b737e6014a5c /html/display_panel/content
parent55469c349c3c47c882ee21348ba67780c8291003 (diff)
Subdomain wildcard support.
Diffstat (limited to 'html/display_panel/content')
-rw-r--r--html/display_panel/content/main_panel.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/html/display_panel/content/main_panel.js b/html/display_panel/content/main_panel.js
index 83c3a6b..9172265 100644
--- a/html/display_panel/content/main_panel.js
+++ b/html/display_panel/content/main_panel.js
@@ -59,6 +59,7 @@ document.querySelector("#info").addEventListener("click", e => {
setTimeout(close, 100);
return;
}
+ if (!button.tagName === "BUTTON") button = button.closest("button");
if (button.matches(".toggle-source")) {
let parent = button.parentNode;
if (!parent.querySelector(".source").textContent) {
@@ -69,10 +70,13 @@ document.querySelector("#info").addEventListener("click", e => {
return;
}
if (!button.matches(".buttons > button")) return;
+ let domain = button.querySelector(".domain");
+
let li = button.closest("li");
let entry = li && li._scriptEntry || [currentReport.url, "Page's site"];
let action = button.className;
- let site = button.name === "*";
+ let site = domain ? domain.textContent : button.name === "*" ? currentReport.site : "";
+
if (site) {
([action] = action.split("-"));
}