Added audio on lightmode

This commit is contained in:
Kristofers Solo
2023-01-20 06:07:04 +02:00
parent 4994e193b4
commit cf4c205c5e
4 changed files with 9 additions and 3 deletions

View File

@@ -1,10 +1,11 @@
let lightmode = localStorage.getItem("lightmode")
const HTML = document.documentElement
console.log(HTML)
const ENABLE_LIGHT_MODE = () => {
const AUDIO = document.getElementById("flashbang")
HTML.setAttribute("data-color-mode", "light")
localStorage.setItem("lightmode", "enabled")
AUDIO.play()
}
const DISABLE_LIGHT_MODE = () => {