mirror of
https://git.kittycat.homes/zoe/hugo-battheme.git
synced 2024-08-15 03:25:18 +00:00
fallbacks for noscript
This commit is contained in:
parent
5cc0c2e449
commit
797ce896ad
10 changed files with 66 additions and 6 deletions
|
@ -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
10
static/js/noscript.js
Normal 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";
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue