fix(a11y): prevent disableImages FOUC

This commit is contained in:
ZhenShuo Leo
2025-08-05 17:02:53 +08:00
parent ade00547b3
commit 344f7de0da
2 changed files with 4 additions and 14 deletions
+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") {