feat(frontend): replace lazy loading with zibll lazysizes

This commit is contained in:
kate522 committed 2026-08-18 01:33:38 +08:00
1 parent 02571eecd6
commit 435ee1daa7
78 files changed
+1515 -909

No files matched your search

+3 -26
View File
@@ -276,32 +276,9 @@
/** Generic remote-box / lazyload-action=ias (zibll-compatible). */
function bindRemoteBoxes(root) {
(root || document).querySelectorAll("[remote-box]").forEach(function (box) {
var form = box.closest("form");
if (form) {
form.addEventListener(
"mouseenter",
function () {
loadRemote(box);
},
{ once: true }
);
form.addEventListener(
"focusin",
function () {
loadRemote(box);
},
{ once: true }
);
}
if ("requestIdleCallback" in window) {
requestIdleCallback(function () {
loadRemote(box);
});
} else {
setTimeout(function () {
loadRemote(box);
}, 600);
}
if (box.dataset.aksrtRemoteBound === "1") return;
box.dataset.aksrtRemoteBound = "1";
box.addEventListener("click", function () { loadRemote(box); });
});
}