ui stuff, proxy?, and whatever else

This commit is contained in:
first@lynx.com
2026-08-17 14:23:34 -04:00
parent b1a1403c13
commit 9d640ff608
18 changed files with 1262 additions and 149 deletions

View File

@ -98,16 +98,18 @@ document.addEventListener("DOMContentLoaded", async ()=>{
}
})
let scrollRaf = null;
document.addEventListener("scroll", () => {
if (scrollRaf) return;
scrollRaf = requestAnimationFrame(() => {
const pjs = document.getElementById("pjs");
if (pjs) pjs.style.top = window.scrollY + "px";
scrollRaf = null;
});
});
function handlePanicKeydown(e) {
let panic;
try {
panic = JSON.parse(localStorage.getItem("selenite.panic-mode") || "{}");
} catch {
return;
}
if (panic.key && panic.url && e.key.toLowerCase() === panic.key.toLowerCase()) {
location.href = panic.url;
}
}
document.addEventListener("keydown", handlePanicKeydown);
if ("serviceWorker" in navigator) {
navigator.serviceWorker.addEventListener('message', (event) => {