Update darkmoderewrite.js

This commit is contained in:
css pro 2024-10-02 17:32:45 -07:00 committed by GitHub
parent 7081d3073b
commit 104f65dc53
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,25 +3,37 @@ $(document).ready(function() {
var isChecked = $("#darkModeCheckbox").is(":checked");
if (isChecked) {
const body = document.querySelector('body');
body.style.backgroundColor = '#404040';
body.style.backgroundColor = '#141414';
body.style.color = '#f1f1f1';
const p = document.querySelector('p');
p.style.color = '#f1f1f1';
const head = document.querySelector('h1');
const headTwo = document.querySelector('h2');
head.style.color = '#f1f1f1';
const head = document.querySelector('h1');
headTwo.style.color = '#f1f1f1';
const foot = document.querySelector('.footer');
foot.style.backgroundColor = 'grey';
const button = document.querySelector('button');
button.style.backgroundColor = '#13f4f3';
button.style.backgroundColor = '#21ccaa';
} else {
const body = document.querySelector('body');
body.style.backgroundColor = '#f1f1f1';
body.style.color = 'black';
const p = document.querySelector('p');
p.style.color = 'black';
const headTwo = document.querySelector('h2');
head.style.color = 'black';
const head = document.querySelector('h1');
headTwo.style.color = 'black';
const foot = document.querySelector('.footer');
foot.style.backgroundColor = '#ddd';