Skip to content

Commit

Permalink
Remove debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
todaydevs committed Mar 2, 2021
1 parent af4d529 commit 9f4e10c
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,11 @@ <h1>Dark mode using Sass</h1>
if (checkbox.checked == true) {
trans();
document.documentElement.setAttribute('data-theme', 'dark')
alert('true');
createCookie('darkmode', 'darkmodeisactive', 1);

}else{
trans();
document.documentElement.setAttribute('data-theme', 'light')
alert('false')
eraseCookie('darkmode')
}
});
Expand All @@ -63,19 +61,7 @@ <h1>Dark mode using Sass</h1>
checkbox.checked = false;
document.documentElement.setAttribute('data-theme', 'light')
}
/*
if(this.checked){
trans();
document.documentElement.setAttribute('data-theme', 'dark')
}else{
if(this.checked){
trans();
document.documentElement.setAttribute('data-theme', 'dark')
}else{
trans();
document.documentElement.setAttribute('data-theme', 'light')
}
*/

let trans = () => {
document.documentElement.classList.add('transition');
window.setTimeout( () => {
Expand Down

0 comments on commit 9f4e10c

Please sign in to comment.