Merge pull request #8 from SergeyAverin/SergeyAverin-patch-1
added a change of theme depending at the time
This commit is contained in:
commit
857c2392bb
@ -30,3 +30,12 @@ themeToggle.addEventListener('click', () => {
|
||||
disableDark();
|
||||
}
|
||||
});
|
||||
|
||||
const today = new Date();
|
||||
const Hr = today.getHours();
|
||||
|
||||
if (Hr >= 19 || Hr < 5) {
|
||||
enableDark();
|
||||
} else {
|
||||
disableDark();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user