mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 19:40:55 +08:00
19 lines
480 B
Plaintext
19 lines
480 B
Plaintext
script.
|
|
(() => {
|
|
function loadWaline () {
|
|
function initWaline () {
|
|
let initData = {
|
|
el: null,
|
|
serverURL: '!{theme.waline.serverURL}',
|
|
comment: true
|
|
}
|
|
const waline = Waline.init(initData)
|
|
}
|
|
|
|
if (typeof Waline === 'object') initWaline()
|
|
else getScript('!{url_for(theme.asset.waline_js)}').then(initWaline)
|
|
}
|
|
|
|
window.pjax ? loadWaline() : window.addEventListener('load', loadWaline)
|
|
})()
|