feat minister_ge.html

This commit is contained in:
2026-05-13 23:10:23 +08:00
parent 98f47f0020
commit 2b5a86f6f7
23 changed files with 977 additions and 404 deletions
+17 -8
View File
@@ -76,13 +76,22 @@
setHubPanel(initialHub);
setReaderMode("scroll");
const hash = (location.hash || "").slice(1);
if (hash && document.getElementById(hash)) {
setHubPanel("reader");
setReaderMode("scroll");
pager.hidden = true;
requestAnimationFrame(() => {
document.getElementById(hash)?.scrollIntoView({ behavior: "smooth", block: "start" });
});
function applyLocationHashNavigation() {
const hash = (location.hash || "").slice(1);
if (hash === "ebook") {
setHubPanel("ebook");
return;
}
if (hash && document.getElementById(hash)) {
setHubPanel("reader");
setReaderMode("scroll");
pager.hidden = true;
requestAnimationFrame(() => {
document.getElementById(hash)?.scrollIntoView({ behavior: "smooth", block: "start" });
});
}
}
applyLocationHashNavigation();
window.addEventListener("hashchange", applyLocationHashNavigation);
})();