mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2025-09-15 12:58:48 +08:00
fix: 修復首頁文章 valine 評論數只顯示第一篇的 bug fix: 修復子目錄下,第三方插件本地資源無法加載的 bug closed #908 fix: 評論系統開啟時 busuanzi 的 page_pv 不顯示的 bug closed #902 fix: 修復 pjax 下,使用 mermaid 跳轉會重新加載的 bug
21 lines
557 B
Plaintext
21 lines
557 B
Plaintext
script.
|
|
(() => {
|
|
function loadValine () {
|
|
function initValine () {
|
|
let initData = {
|
|
el: '#vcomment',
|
|
appId: '#{theme.valine.appId}',
|
|
appKey: '#{theme.valine.appKey}',
|
|
serverURLs: '#{theme.valine.serverURLs}'
|
|
}
|
|
|
|
const valine = new Valine(initData)
|
|
}
|
|
|
|
if (typeof Valine === 'function') initValine()
|
|
else getScript('!{url_for(theme.asset.valine)}').then(initValine)
|
|
}
|
|
|
|
window.pjax ? loadValine() : window.addEventListener('load', loadValine)
|
|
})()
|