mirror of
https://github.com/amehime/hexo-theme-shoka.git
synced 2026-04-05 10:42:51 +08:00
fix
This commit is contained in:
@@ -256,7 +256,7 @@ const clipBoard = function(str, callback) {
|
||||
BODY.removeChild(ta);
|
||||
}
|
||||
|
||||
const loadRecentComment = function (root) {
|
||||
const loadRecentComment = function (pjax) {
|
||||
// set serverURLs
|
||||
var prefix = 'https://'
|
||||
var serverURLs = ''
|
||||
@@ -283,7 +283,7 @@ const loadRecentComment = function (root) {
|
||||
appKey: options.appKey,
|
||||
serverURLs: serverURLs
|
||||
})
|
||||
|
||||
var el = $('#rcomment')
|
||||
AV.Query.doCloudQuery(
|
||||
"select nick, mail, comment, url from Comment where (rid='' or rid is not exists) order by -createdAt limit 0,10"
|
||||
).then(function(rets){
|
||||
@@ -299,9 +299,11 @@ const loadRecentComment = function (root) {
|
||||
+'</li>'
|
||||
}
|
||||
|
||||
$('#rcomment').createChild('ul', {
|
||||
el.createChild('ul', {
|
||||
innerHTML: html
|
||||
})
|
||||
|
||||
pjax.refresh(el);
|
||||
}
|
||||
}).catch(function(e){})
|
||||
} catch (e) {}
|
||||
|
||||
@@ -27,8 +27,6 @@ const domInit = function() {
|
||||
showContents.addEventListener('click', sideBarToggleHandle);
|
||||
|
||||
toolPlayer.player();
|
||||
|
||||
loadRecentComment();
|
||||
}
|
||||
|
||||
|
||||
@@ -47,6 +45,7 @@ const pjaxReload = function () {
|
||||
|
||||
$('#content').innerHTML = ''
|
||||
$('#content').appendChild(loadCat.lastChild.cloneNode(true));
|
||||
pageScroll(BODY);
|
||||
}
|
||||
|
||||
const siteRefresh = function (reload) {
|
||||
@@ -107,6 +106,7 @@ const siteInit = function () {
|
||||
themeColorListener()
|
||||
|
||||
algoliaSearch(pjax)
|
||||
loadRecentComment(pjax)
|
||||
|
||||
window.addEventListener('scroll', scrollHandle)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user