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:
@@ -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)}`;
|
||||
}
|
||||
|
Reference in New Issue
Block a user