summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEltrac <45323514+BigCoke233@users.noreply.github.com>2019-10-06 13:52:46 +0800
committerGitHub <noreply@github.com>2019-10-06 13:52:46 +0800
commitec0f4433b86b547ad1a151f006e3b57b4d957ba7 (patch)
tree8fcc91be67e537743ef98200415a0be3f103d718
parent3641e22645eb06b54b29bfac720f7184a6c86836 (diff)
⏰ Add: 根据时间自动开启夜间模式
-rw-r--r--assets/js/miracles.min.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/assets/js/miracles.min.js b/assets/js/miracles.min.js
index 6794cd3..6fade20 100644
--- a/assets/js/miracles.min.js
+++ b/assets/js/miracles.min.js
@@ -98,6 +98,13 @@ else if(whetherGray == "on") {
else if(whetherSepia == "on") {
$("html").addClass("html-filter-sepia");
}
+//根据时间判断
+(function(){
+ if(new Date().getHours() > 20 || new Date().getHours() < 6){
+ $("body").addClass("body-dark");
+ alertSend('夜幕降临,已为您打开夜间模式',true);
+ }
+})();
/**
* GoTop