Skip to content
Snippets Groups Projects
Unverified Commit d45d1561 authored by 染川 瞳's avatar 染川 瞳 Committed by GitHub
Browse files

Add files via upload

parent 1d2442c3
Branches
Tags 1.10.0
No related merge requests found
......@@ -348,12 +348,11 @@ function checkBgImgCookie() {
}
}
function checkDarkModeCookie() {
if (mashiro_option.darkmode) {
var dark = getCookie("dark"),
today = new Date()
cWidth = document.body.clientWidth;
if (!dark) {
if ((today.getHours() > 21 || today.getHours() < 7)) {
if ((today.getHours() > 21 || today.getHours() < 7) && mashiro_option.darkmode) {
setTimeout(function () {
$("#dark-bg").click();
}, 100);
......@@ -372,7 +371,7 @@ function checkDarkModeCookie() {
}
}
} else {
if (dark == '1' && (today.getHours() >= 22 || today.getHours() <= 6)) {
if (dark == '1' && (today.getHours() >= 22 || today.getHours() <= 6) && mashiro_option.darkmode) {
setTimeout(function () {
$("#dark-bg").click();
}, 100);
......@@ -392,7 +391,6 @@ function checkDarkModeCookie() {
}
}
}
}
if (!getCookie("darkcache") && (new Date().getHours() > 21 || new Date().getHours() < 7)) {
removeCookie("dark");
setCookie("darkcache", "cached", 0.4);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment