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

View file

@ -107,6 +107,6 @@
</div>
</div>
</footer>
<script src=../js/main.min.js></script>
<script src=../js/main.js></script>
</body>
</html>

View file

@ -96,6 +96,6 @@
</div>
</div>
</footer>
<script src=../js/main.min.js></script>
<script src=../js/main.js></script>
</body>
</html>

View file

@ -152,6 +152,6 @@
</div>
</div>
</footer>
<script src=js/main.min.js></script>
<script src=js/main.js></script>
</body>
</html>

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')
})()

File diff suppressed because one or more lines are too long

View file

@ -127,6 +127,6 @@ And <a href="https://github.com/iv-org/invidious/graphs/contributors">more!</a>
</div>
</div>
</footer>
<script src=../js/main.min.js></script>
<script src=../js/main.js></script>
</body>
</html>