mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2025-09-15 12:58:48 +08:00
improvements: 補全card-categories和card-archives的 '查看更多‘鏈接 close #337 fix: 修復comments沒設置時,報Unexpected token ')'的bugs close #344 improvements: 優化js和html fix: 修復toc 滾動百分比不準的Bugs
26 lines
756 B
Plaintext
26 lines
756 B
Plaintext
script.
|
|
function loadLivere () {
|
|
if (typeof LivereTower === 'object') {
|
|
window.LivereTower.init()
|
|
}
|
|
else {
|
|
(function(d, s) {
|
|
var j, e = d.getElementsByTagName(s)[0];
|
|
if (typeof LivereTower === 'function') { return; }
|
|
j = d.createElement(s);
|
|
j.src = 'https://cdn-city.livere.com/js/embed.dist.js';
|
|
j.async = true;
|
|
e.parentNode.insertBefore(j, e);
|
|
})(document, 'script');
|
|
}
|
|
}
|
|
|
|
if ('!{theme.comments.use[0]}' === 'Livere' || !!{theme.comments.lazyload}) {
|
|
if (!{theme.comments.lazyload}) btf.loadComment(document.getElementById('lv-container'), loadLivere)
|
|
else loadLivere()
|
|
}
|
|
else {
|
|
function loadOtherComment () {
|
|
loadLivere()
|
|
}
|
|
} |