mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 17:50:54 +08:00
feat: 修改newest_comments的leancloud為valine,並刪除其配置,改為讀取valine配置
feat: 增加waline最新評論模塊 feat: 增加waline評論數顯示 feat: 增加waline評論 fix: 修復jquery在一些界面仍然加載問題
This commit is contained in:
@@ -288,15 +288,17 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
}
|
||||
|
||||
const jqLoadAndRun = () => {
|
||||
const isFancybox = GLOBAL_CONFIG.lightbox === 'fancybox'
|
||||
const $fancyboxEle = isFancybox ? document.querySelectorAll('#article-container :not(a):not(.gallery-group) > img, #article-container > img') : null
|
||||
const $fancyboxEle = GLOBAL_CONFIG.lightbox === 'fancybox'
|
||||
? document.querySelectorAll('#article-container :not(a):not(.gallery-group) > img, #article-container > img')
|
||||
: []
|
||||
const fbLengthNoZero = $fancyboxEle.length > 0
|
||||
const $jgEle = document.querySelectorAll('#article-container .justified-gallery')
|
||||
const jgEleLength = $jgEle.length
|
||||
const jgLengthNoZero = $jgEle.length > 0
|
||||
|
||||
if (jgEleLength || $fancyboxEle !== null) {
|
||||
if (jgLengthNoZero || fbLengthNoZero) {
|
||||
btf.isJqueryLoad(() => {
|
||||
jgEleLength && runJustifiedGallery($jgEle)
|
||||
isFancybox && addFancybox($fancyboxEle)
|
||||
jgLengthNoZero && runJustifiedGallery($jgEle)
|
||||
fbLengthNoZero && addFancybox($fancyboxEle)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user