From 41614091a7132966c87739d8b870f00898ebdd87 Mon Sep 17 00:00:00 2001 From: "1152958806@qq.com" <17683872107czx> Date: Thu, 19 Oct 2023 14:26:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E9=A1=B5=E9=9D=A2=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E9=A1=B5=E9=9D=A2=E5=AF=BC=E8=87=B4=E8=AF=84=E8=AE=BA?= =?UTF-8?q?=E8=B7=AF=E7=94=B1=E4=B8=8D=E5=AF=B9=EF=BC=8C=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E8=AF=84=E8=AE=BA=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/assets/js/comment/artalk.js | 2 +- templates/assets/js/comment/twikoo.js | 1 + templates/assets/js/comment/waline.js | 2 +- templates/assets/zhheo/commentBarrage.js | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/templates/assets/js/comment/artalk.js b/templates/assets/js/comment/artalk.js index b1306148..88eaf6cb 100644 --- a/templates/assets/js/comment/artalk.js +++ b/templates/assets/js/comment/artalk.js @@ -6,7 +6,7 @@ el: '#artalk-wrap', server: GLOBAL_CONFIG.source.artalk.artalkUrl, site: GLOBAL_CONFIG.source.artalk.siteName, - pageKey: location.pathname, + pageKey: location.pathname.replace(/\/page\/\d$/, ""), darkMode: false, countEl: '#ArtalkCount' }, null)) diff --git a/templates/assets/js/comment/twikoo.js b/templates/assets/js/comment/twikoo.js index 9ee2a9ff..21d958b7 100644 --- a/templates/assets/js/comment/twikoo.js +++ b/templates/assets/js/comment/twikoo.js @@ -5,6 +5,7 @@ el: '#twikoo-wrap', envId: GLOBAL_CONFIG.source.twikoo.twikooUrl, region: '', + path: location.pathname.replace(/\/page\/\d$/, ""), onCommentLoaded: function () { btf.loadLightbox(document.querySelectorAll('#twikoo .tk-content img:not(.tk-owo-emotion)')) typeof hljs === 'object' && hljs.highlightAll() diff --git a/templates/assets/js/comment/waline.js b/templates/assets/js/comment/waline.js index c7a9717e..94cc7b40 100644 --- a/templates/assets/js/comment/waline.js +++ b/templates/assets/js/comment/waline.js @@ -6,7 +6,7 @@ serverURL: GLOBAL_CONFIG.source.waline.serverURL, pageview: false, dark: 'html[data-theme="dark"]', - path: window.location.pathname, + path: window.location.pathname.replace(/\/page\/\d$/, ""), comment: false, locale:GLOBAL_CONFIG.source.waline.locale }, null)) diff --git a/templates/assets/zhheo/commentBarrage.js b/templates/assets/zhheo/commentBarrage.js index f011d00a..21fb74be 100644 --- a/templates/assets/zhheo/commentBarrage.js +++ b/templates/assets/zhheo/commentBarrage.js @@ -12,7 +12,7 @@ if(GLOBAL_CONFIG.htmlType!='comments' && document.querySelector('#post-comment') //token获取见上方 accessToken: GLOBAL_CONFIG.source.twikoo.accessToken, mailMd5: GLOBAL_CONFIG.source.comments.mailMd5, - pageUrl: window.location.pathname, + pageUrl: window.location.pathname.replace(/\/page\/\d$/, ""), barrageTimer: [], barrageList: [], siteName: GLOBAL_CONFIG.source.artalk.siteName,