1
0
mirror of https://github.com/coalaura/whiskr.git synced 2025-09-09 01:09:54 +00:00

morphdom & better images

This commit is contained in:
Laura
2025-08-10 15:53:30 +02:00
parent 8996173b3f
commit 960736e161
7 changed files with 96 additions and 78 deletions

View File

@@ -28,6 +28,16 @@ function loadValue(key, fallback = false) {
return fallback;
}
function schedule(cb) {
if (document.visibilityState === "visible") {
requestAnimationFrame(cb);
return;
}
setTimeout(cb, 80);
}
function uid() {
return `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
}