From eb8202dfade9a3f3143cb3a1b06e3556dde1a52e Mon Sep 17 00:00:00 2001 From: Vaica <94612053+zqlit@users.noreply.github.com> Date: Fri, 23 Jan 2026 12:30:46 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20=E7=A7=BB=E5=8A=A8=E7=AB=AF=E4=BF=AE?= =?UTF-8?q?=E5=A4=8Dpjax=E5=8A=A0=E8=BD=BD=E8=AF=84=E8=AE=BA=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BAbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/Ying/assets/js/mypjax.js | 2 +- themes/Ying/layouts/_default/single.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/Ying/assets/js/mypjax.js b/themes/Ying/assets/js/mypjax.js index 868407d3..b77691f0 100644 --- a/themes/Ying/assets/js/mypjax.js +++ b/themes/Ying/assets/js/mypjax.js @@ -183,7 +183,7 @@ document.addEventListener("pjax:complete", function () { site: '优世界', // 你的站点名 // 使用全局变量或 DOM 读取 pageKey // 必须动态获取当前页面的 pid (RelPermalink) - pageKey: document.getElementById('data-pid')?.innerText || location.pathname, + pageKey: document.getElementById('data-pid')?.textContent?.trim() || location.pathname, flatMode: true, emoticons: '/emotion/OwO.json' }) diff --git a/themes/Ying/layouts/_default/single.html b/themes/Ying/layouts/_default/single.html index 62d5b51b..1a6d6a5a 100644 --- a/themes/Ying/layouts/_default/single.html +++ b/themes/Ying/layouts/_default/single.html @@ -1,7 +1,7 @@ {{ define "main" }}