fallbacks for noscript

This commit is contained in:
zoe 2022-05-27 17:11:36 +02:00
parent 5cc0c2e449
commit 797ce896ad
10 changed files with 66 additions and 6 deletions

View file

@ -1,9 +1,11 @@
import { updateMode } from "./lightmode.js";
import { activateHamburger } from "./hamburger.js";
import { randomizeWords } from "./randomword.js";
import { unhide_elements } from "./noscript.js";
document.addEventListener("DOMContentLoaded", () => {
updateMode();
activateHamburger();
randomizeWords();
unhide_elements();
});

10
static/js/noscript.js Normal file
View file

@ -0,0 +1,10 @@
const flexes = document.getElementsByClassName("flexjs");
const iflexes = document.getElementsByClassName("iflexjs");
export function unhide_elements() {
for (let element of flexes) {
element.style.display = "flex";
}
for (let element of iflexes) {
element.style.display = "inline-flex";
}
}