mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2025-09-15 12:58:48 +08:00
20 lines
506 B
Plaintext
20 lines
506 B
Plaintext
script.
|
|
(() => {
|
|
function loadValine () {
|
|
function initValine () {
|
|
let initData = {
|
|
el: '#vcomment',
|
|
appId: '#{theme.valine.appId}',
|
|
appKey: '#{theme.valine.appKey}',
|
|
}
|
|
|
|
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)
|
|
})()
|