mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 15:31:52 +00:00
fix(a11y): disableImages not working when layoutBackgroundBlur is false
This commit is contained in:
+4
-8
@@ -16,14 +16,10 @@ window.A11yPanel = (() => {
|
||||
disableImages: {
|
||||
default: false,
|
||||
apply: (enabled) => {
|
||||
document.querySelectorAll("script[data-target-id]").forEach((script) => {
|
||||
const image = document.getElementById(script.getAttribute("data-image-id"));
|
||||
const imageUrl = script.getAttribute("data-image-url");
|
||||
if (image) {
|
||||
image.style.display = enabled ? "none" : "";
|
||||
if (!enabled && imageUrl && !image.src) image.src = imageUrl;
|
||||
}
|
||||
});
|
||||
const image = document.getElementById("background-image");
|
||||
if (image) {
|
||||
image.style.display = enabled ? "none" : "";
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user