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.js11
1 files changed, 10 insertions, 1 deletions
diff --git a/html/display_panel/content/main_panel.js b/html/display_panel/content/main_panel.js
index 60eae55..022be8c 100644
--- a/html/display_panel/content/main_panel.js
+++ b/html/display_panel/content/main_panel.js
@@ -55,8 +55,17 @@ liTemplate.remove();
document.querySelector("#info").addEventListener("click", e => {
let button = e.target;
+ if (button.tagName === "A") {
+ setTimeout(close, 100);
+ return;
+ }
if (button.matches(".toggle-source")) {
- let sourceContainer = button.parentNode.querySelector(".source").classList.toggle("visible");
+ let parent = button.parentNode;
+ if (!parent.querySelector(".source").textContent) {
+ parent.querySelector("a").click();
+ } else {
+ parent.classList.toggle("visible");
+ }
return;
}
if (!button.matches(".buttons > button")) return;