From 2a467dfc76998e392641bb7a681c94974f575b8d Mon Sep 17 00:00:00 2001 From: BigCoke233 Date: Sun, 12 Apr 2020 14:57:51 +0800 Subject: =?UTF-8?q?:cat:=20Fix:=20=E4=BF=AE=E5=A4=8D=E5=BB=BA=E7=AB=99?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=97=A0=E6=B3=95=E6=AD=A3=E5=B8=B8=E8=BE=93?= =?UTF-8?q?=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/js/miracles.min.js | 49 ++++++++++++++++++++++++----------------------- libs/Options.php | 2 -- 2 files changed, 25 insertions(+), 26 deletions(-) diff --git a/assets/js/miracles.min.js b/assets/js/miracles.min.js index ca56a58..dff9298 100644 --- a/assets/js/miracles.min.js +++ b/assets/js/miracles.min.js @@ -403,30 +403,31 @@ function getWordsNum() { /** * Build Time Echo */ -function startTime(time = '2010-01-01') { - startTimeV = time; - var $time = new Date().getTime() - new Date(startTimeV); - if ($time < 0) return '0秒'; - let result = ''; - if ($time >= 365 * 86400000) { - result += parseInt($time / (365 * 86400000)) + ' 年 '; - $time = ($time % (365 * 86400000)); - } - if ($time >= 86400000) { - result += parseInt($time / 86400000) + ' 天 '; - $time = ($time % 86400000); - } - if ($time >= 3600000) { - result += parseInt($time / 3600000) + ' 小时 '; - $time = ($time % 3600000); - } - if ($time >= 60000) { - result += parseInt($time / 60000) + ' 分 '; - $time = ($time % 60000); - } - result += parseInt($time / 1000) + ' 秒 '; - $('#build-time').html(result); - buildTimeout = setTimeout('startTime(startTimeV)', 1000) +function startTime(a) { + var time = a; + startTimeV = time; + var b = new Date().getTime() - new Date(startTimeV); + if (b < 0) return '0 秒'; + let result = ''; + if (b >= 365 * 86400000) { + result += parseInt(b / (365 * 86400000)) + ' 年 '; + b = (b % (365 * 86400000)) + } + if (b >= 86400000) { + result += parseInt(b / 86400000) + ' 天 '; + b = (b % 86400000) + } + if (b >= 3600000) { + result += parseInt(b / 3600000) + ' 小时 '; + b = (b % 3600000) + } + if (b >= 60000) { + result += parseInt(b / 60000) + ' 分 '; + b = (b % 60000) + } + result += parseInt(b / 1000) + ' 秒 '; + $('#build-time').html(result); + buildTimeout = setTimeout('startTime(startTimeV)', 1000) } /** diff --git a/libs/Options.php b/libs/Options.php index 13ec8ea..21ece40 100755 --- a/libs/Options.php +++ b/libs/Options.php @@ -140,8 +140,6 @@ function themeConfig($form) { $form->addInput($CDN); $ifShowRTA = new Typecho_Widget_Helper_Form_Element_Select('ifShowRTA',array('0'=>'不显示','1'=>'显示'),'0','阅读时长提示 RTA','在文章前加入阅读时长提示,增进用户体验'); $form->addInput($ifShowRTA); - $postQR = new Typecho_Widget_Helper_Form_Element_Text('postQR', NULL, NULL, _t('自定义文章二维码 API'), _t('默认调用 topscan.com 的 API,你可以在这里输入其他的 API 地址,例如:https://api.qrserver.com/v1/create-qr-code/?size=230x230&data=
')); - $form->addInput($postQR); //custom style $grayTheme = new Typecho_Widget_Helper_Form_Element_Select('grayTheme',array('0'=>'关闭','1'=>'开启'),'0','

个性化

哀悼模式','打开后网站变为黑白'); -- cgit v1.2.3