fix [data-totoga-hub] 按鈕加上 click,呼叫 setHubPanel

This commit is contained in:
2026-05-14 18:28:39 +08:00
parent efed0a5feb
commit 03597e1c53
6 changed files with 356 additions and 265 deletions
+7
View File
@@ -10,6 +10,13 @@
});
}
hubButtons.forEach((button) => {
button.addEventListener("click", () => {
const name = button.dataset.totogaHub;
if (name) setHubPanel(name);
});
});
const reader = document.getElementById("totoga2-reader");
const chapters = reader ? Array.from(reader.querySelectorAll(".chronicle-chapter")) : [];
const modeButtons = Array.from(document.querySelectorAll("[data-totoga-reader-mode]"));