css darklight
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
ale 2024-10-06 02:17:19 +02:00
parent 72e7fe7873
commit 70755cc2de

View File

@ -1,3 +1,5 @@
import * as light from './light.css';
import * as dark from './main.css';
document.addEventListener('DOMContentLoaded', function () {
loading()
var hold, external, timeout, ac, last
@ -130,10 +132,10 @@ document.addEventListener('DOMContentLoaded', function () {
})
document.getElementById('darklight').addEventListener('click', function(event) {
if(event.target.innerText === '☼') {
document.getElementById('css').setAttribute('href', 'light.css')
document.getElementById('css').setAttribute('href', light.meta.url)
event.target.innerText = '☽'
} else {
document.getElementById('css').setAttribute('href', 'main.css')
document.getElementById('css').setAttribute('href', dark.meta.url)
event.target.innerText = '☼'
}
})