mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 20:30:53 +08:00
🐛 修復livere在pjax下的bugs
This commit is contained in:
21
layout/includes/third-party/comments/livere.pug
vendored
21
layout/includes/third-party/comments/livere.pug
vendored
@@ -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}) {
|
||||||
|
|||||||
Reference in New Issue
Block a user