diff --git a/assets/js/puock.js b/assets/js/puock.js index c06d494..7821139 100644 --- a/assets/js/puock.js +++ b/assets/js/puock.js @@ -1041,6 +1041,13 @@ class Puock { const title = el.attr("title") || el.data("title") || '提示'; const url = el.data("url"); const onceLoad = el.data("once-load") + + // 检查 url 是否存在,避免 SparkMD5 错误 + if (!url) { + console.warn('Modal toggle: url is undefined'); + return; + } + const id = SparkMD5.hash(url) if (onceLoad && this.data.modalStorage[id]) { this.modalLoadRender(id, this.data.modalStorage[id], title, noTitle, noPadding) diff --git a/footer.php b/footer.php index f543bfc..069ff68 100644 --- a/footer.php +++ b/footer.php @@ -68,7 +68,7 @@ © options->title(); ?>
 Theme by - Puock + Puock  Powered by Typecho

老孙博客制作

diff --git a/page-random.php b/page-random.php index 0069a61..5c925b4 100644 --- a/page-random.php +++ b/page-random.php @@ -52,67 +52,14 @@ function getRandomPost() { // 获取随机文章链接 $randomPostUrl = getRandomPost(); -$this->need('header.php'); -?> - -
-
- options->showsidebar): ?> -
- -
- -
-
-

随机阅读

-
-
-
-
- -

正在为您随机选择一篇文章...

-

请稍候,正在跳转中...

-
-
- Loading... -
-
-
-
-
- options->showsidebar): ?> - need('sidebar.php'); ?> - -
-
- - - -need('footer.php'); ?> \ No newline at end of file +?> \ No newline at end of file diff --git a/page-says.php b/page-says.php index 2e692ad..b55aae2 100644 --- a/page-says.php +++ b/page-says.php @@ -91,7 +91,7 @@ $this->need('header.php');
options->social): ?> - - +
+ +
+
-
`; +
+ `; document.body.appendChild(modal); document.getElementById('img-insert-cancel').onclick = function() { document.body.removeChild(modal); diff --git a/post.php b/post.php index d09d9f6..add2be1 100644 --- a/post.php +++ b/post.php @@ -56,7 +56,7 @@ $wordCount = mb_strlen($content, 'UTF-8'); ?>
-

共计个字符,预计需要花费 分钟才能阅读完成。

+

 本文共计字,预计需要花费 分钟才能阅读完成。

modified;