Skip to content

Commit

Permalink
🔨 修复 定时开/关暗色模式无法正常工作问题 (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
bhaoo authored Nov 27, 2023
1 parent 79f94ad commit a2382d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*
* @author Bhao
* @link https://dwd.moe/
* @date 2023-11-26
* @date 2023-11-27
*/

if (!defined('__TYPECHO_ROOT_DIR__')) exit;
Expand Down Expand Up @@ -301,7 +301,7 @@ function otherJs(){
$string = '<script>';
$string .= (Helper::options()->statisticsBaidu) ? "var _hmt = _hmt || [];(function() {var hm = document.createElement('script');hm.src = 'https://hm.baidu.com/hm.js?". Helper::options()->statisticsBaidu ."';var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(hm, s);})();" : '';
$string .= (Helper::options()->qrcode && in_array('open', Helper::options()->qrcode)) ? "qrcode(true);" : '';
$string .= ($brightTime_arr) ? "var nowHour=new Date().getHours();if(nowHour>".$brightTime_arr[0]." || nowHour<".$brightTime_arr[1]."){darkContent('".$brightTime_arr[2]."')};" : '';
$string .= ($brightTime_arr) ? "var nowHour=new Date().getHours();if(nowHour>".$brightTime_arr[0]." && nowHour<".$brightTime_arr[1]."){darkContent('".$brightTime_arr[2]."')};" : '';
$string .= (Helper::options()->katexOption) ? 'renderMath=function(className){renderMathInElement(className,'. Helper::options()->katexOption .')};if($(".post-content").length){renderMath($(".post-content")[0])}' : '';
$string .= (Helper::options()->otherJs) ? Helper::options()->otherJs : '';
$string .= '</script>';
Expand Down
2 changes: 1 addition & 1 deletion includes/setting.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*
* @author Bhao
* @link https://dwd.moe/
* @date 2023-11-22
* @date 2023-11-27
*/

if (!defined('__TYPECHO_ROOT_DIR__')) exit;
Expand Down

0 comments on commit a2382d5

Please sign in to comment.