fix(a11y): prevent disableImages FOUC

This commit is contained in:
ZhenShuo Leo committed 2025-08-05 18:23:16 +08:00
1 parent ade00547b3
commit 344f7de0da
2 files changed
+4 -14

No files matched your search

+4 -1
View File
@@ -144,7 +144,10 @@ window.A11yPanel = (() => {
};
if (getSettings().disableImages) {
FEATURES.disableImages.apply(true);
new MutationObserver(() => {
const img = document.getElementById("background-image");
if (img) img.style.display = "none";
}).observe(document, { childList: true, subtree: true });
}
if (document.readyState === "loading") {