//xuan 版面js windowheight設定給目前的外圍html:--window-inner-height: // this syncs the window height const syncWindowHeight = () => { document.documentElement.style.setProperty( "--window-inner-height", `${window.innerHeight}px` ); } // this locks the body and remembers the scroll position let scrollY; syncWindowHeight(); scrollY = window.scrollY; document.documentElement.classList.add('epubOpen'); document.documentElement.classList.add('lightBg'); window.addEventListener("resize", function () { if (isAndroid && (document.getElementsByClassName("ReeditNoteView")[0].querySelector(".popup").classList.contains("popup-active") || document.getElementsByClassName("ReeditBookMarkView")[0].querySelector(".popup").classList.contains("popup-active"))) { return; } syncWindowHeight(); });