From 50bf6c8a87928d6b3a023be172eb8a1c49b216b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E8=B5=B5=E5=90=8C=E5=AD=A6?= <94612053+imzql@users.noreply.github.com> Date: Fri, 9 Aug 2024 13:32:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=A7=BB=E5=8A=A8=E7=AB=AF?= =?UTF-8?q?=20=E8=AF=84=E8=AE=BA=E4=B8=8D=E5=8A=A0=E8=BD=BD=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/js/mypjax.js | 11 +++++++---- themes/Ying/static/js/mypjax.js | 11 +++++++---- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/public/js/mypjax.js b/public/js/mypjax.js index 58687d8c..2b0e9c48 100644 --- a/public/js/mypjax.js +++ b/public/js/mypjax.js @@ -180,10 +180,7 @@ document.addEventListener("pjax:complete", function () { }); }); // 重载评论 - if (document.querySelector("#Comments") && !isMobile()) { - for (let i = 0; i <= 5; i++) { - loadBarrager() - } + if (document.querySelector("#Comments")) { Artalk.init({ el: '#Comments', // 绑定元素的 Selector server: 'https://artalk.5b2.cn', // 后端地址 @@ -191,6 +188,12 @@ document.addEventListener("pjax:complete", function () { flatMode: true }) } + // 重载评论弹幕 默认加载五次 + if (document.querySelector("#Comments") && !isMobile()) { + for (let i = 0; i <= 5; i++) { + loadBarrager() + } + } }); diff --git a/themes/Ying/static/js/mypjax.js b/themes/Ying/static/js/mypjax.js index 58687d8c..2b0e9c48 100644 --- a/themes/Ying/static/js/mypjax.js +++ b/themes/Ying/static/js/mypjax.js @@ -180,10 +180,7 @@ document.addEventListener("pjax:complete", function () { }); }); // 重载评论 - if (document.querySelector("#Comments") && !isMobile()) { - for (let i = 0; i <= 5; i++) { - loadBarrager() - } + if (document.querySelector("#Comments")) { Artalk.init({ el: '#Comments', // 绑定元素的 Selector server: 'https://artalk.5b2.cn', // 后端地址 @@ -191,6 +188,12 @@ document.addEventListener("pjax:complete", function () { flatMode: true }) } + // 重载评论弹幕 默认加载五次 + if (document.querySelector("#Comments") && !isMobile()) { + for (let i = 0; i <= 5; i++) { + loadBarrager() + } + } });