hexo/node_modules/hexo-theme-butterfly/layout/includes/third-party/pangu.pug

21 lines
441 B
Plaintext
Raw Normal View History

2023-09-25 15:58:56 +08:00
script.
function panguFn () {
if (typeof pangu === 'object') pangu.autoSpacingPage()
else {
getScript('!{url_for(theme.asset.pangu)}')
.then(() => {
pangu.autoSpacingPage()
})
}
}
function panguInit () {
if (!{theme.pangu.field === 'post'}){
GLOBAL_CONFIG_SITE.isPost && panguFn()
} else {
panguFn()
}
}
document.addEventListener('DOMContentLoaded', panguInit)