🐛 修復livere在pjax下的bugs

This commit is contained in:
Jerry
2020-08-03 18:02:44 +08:00
Unverified
parent 75f5e991d0
commit 8f27859cea

View File

@@ -1,13 +1,18 @@
script. script.
function loadLivere () { function loadLivere () {
(function(d, s) { if (typeof LivereTower === 'object') {
var j, e = d.getElementsByTagName(s)[0]; window.LivereTower.init()
if (typeof LivereTower === 'function') { return; } }
j = d.createElement(s); else {
j.src = 'https://cdn-city.livere.com/js/embed.dist.js'; (function(d, s) {
j.async = true; var j, e = d.getElementsByTagName(s)[0];
e.parentNode.insertBefore(j, e); if (typeof LivereTower === 'function') { return; }
})(document, 'script'); 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.use[0]}' === 'Livere' || !!{theme.comments.lazyload}) {