Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ReverseSacle committed Mar 23, 2024
1 parent f895a80 commit 37d2af1
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions source/js/_app/pjax.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,20 @@ const siteRefresh = function(reload) {
getScript({
src: assetUrl('js','waline'),
onload: function() {
var waline_recent = document.getElementById('waline-recent');
var options = Object.assign({}, CONFIG.waline);
options = Object.assign(options, LOCAL.waline||{});
options.el = '#waline-comment';


if(undefined != document.getElementById('waline-comment'))
{
Waline.init(options);
setTimeout(function(){
positionInit(1);
postFancybox('#waline-comment');
}, 1000);
}

var waline_recent = document.getElementById('waline-recent');
if(waline_recent.hasChildNodes())
{
var parent_label = waline_recent.parentNode;
Expand All @@ -180,15 +189,6 @@ const siteRefresh = function(reload) {
serverURL: options.serverURL,
count: 10,
}).then(({ comments }) => { recent_comment_create(comments.data); });

if(undefined != document.getElementById('waline-comment'))
{
Waline.init(options);
setTimeout(function(){
positionInit(1);
postFancybox('#waline-comment');
}, 1000);
}
}
});
}
Expand Down

0 comments on commit 37d2af1

Please sign in to comment.