Unminify the JavaScript file, and remove everything that isn't used

This commit is contained in:
TheFrenchGhosty 2022-05-29 14:51:23 +02:00
parent ecc0242a3b
commit 9f8a67f34c
6 changed files with 11 additions and 5 deletions

7
public/js/main.js Normal file
View file

@ -0,0 +1,7 @@
(() => {
document.getElementById('mode').addEventListener('click', () => {
document.body.classList.toggle('dark'),
localStorage.setItem('theme', document.body.classList.contains('dark') ? 'dark' : 'light')
}),
localStorage.getItem('theme') === 'dark' && document.body.classList.add('dark')
})()