增加对旧版本的兼容
This commit is contained in:
commit
7095ce790f
|
@ -12,6 +12,7 @@
|
||||||
}, null))
|
}, null))
|
||||||
|
|
||||||
function versionOld(ctx){
|
function versionOld(ctx){
|
||||||
|
// 旧版本兼容性补丁
|
||||||
ctx.getCommentList().forEach(comment => {
|
ctx.getCommentList().forEach(comment => {
|
||||||
const $content = comment.getRender().$content
|
const $content = comment.getRender().$content
|
||||||
btf.loadLightbox($content.querySelectorAll('img:not([atk-emoticon])'))
|
btf.loadLightbox($content.querySelectorAll('img:not([atk-emoticon])'))
|
||||||
|
@ -19,6 +20,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function version_2_7_3_WithUpper(ctx){
|
function version_2_7_3_WithUpper(ctx){
|
||||||
|
// 2.7.3 版本及以后版本支持
|
||||||
ctx.get('list').getCommentNodes().forEach(comment => {
|
ctx.get('list').getCommentNodes().forEach(comment => {
|
||||||
const $content = comment .getRender().$content
|
const $content = comment .getRender().$content
|
||||||
btf.loadLightbox($content.querySelectorAll('img:not([atk-emoticon])'))
|
btf.loadLightbox($content.querySelectorAll('img:not([atk-emoticon])'))
|
||||||
|
@ -36,8 +38,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GLOBAL_CONFIG.lightbox === 'null') return
|
if (GLOBAL_CONFIG.lightbox === 'null') return
|
||||||
artalkItem.on('list-loaded', () => {
|
window.artalkItem.on('list-loaded', () => {
|
||||||
versionCheck(artalkItem.ctx);
|
versionCheck(window.artalkItem.ctx);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ th:with="faceImg = ${theme.config.sidebar.wechat.wechatImgFace}, backImg=${theme
|
||||||
#aside-content .card-widget#card-wechat::before {
|
#aside-content .card-widget#card-wechat::before {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 90%;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
background: url([[${theme.config.sidebar.wechat.wechatImg}]]) center center no-repeat;
|
background: url([[${theme.config.sidebar.wechat.wechatImg}]]) center center no-repeat;
|
||||||
|
|
|
@ -79,12 +79,12 @@
|
||||||
</time>
|
</time>
|
||||||
</span>
|
</span>
|
||||||
<span th:with="syncStatus=${#strings.isEmpty(#annotations.get(post, 'sync_status')) ? '未同步': #annotations.get(post, 'sync_status')}"
|
<span th:with="syncStatus=${#strings.isEmpty(#annotations.get(post, 'sync_status')) ? '未同步': #annotations.get(post, 'sync_status')}"
|
||||||
class="post-meta-wechat" th:title=" ${pluginFinder.available('plugin-platforms-sync') && syncStatus == '同步更新文章成功' ? '该文章已在公众号中更新' : '该文章在博客首发'}">
|
class="post-meta-wechat" th:title=" ${pluginFinder.available('plugin-platforms-sync') && (syncStatus == '同步更新文章成功' || syncStatus == '同步上传文章成功') ? '该文章已在公众号中更新' : '该文章在博客首发'}">
|
||||||
<th:block th:if="${!pluginFinder.available('plugin-platforms-sync') || syncStatus != '同步更新文章成功'}">
|
<th:block th:unless="${pluginFinder.available('plugin-platforms-sync') && (syncStatus == '同步更新文章成功' || syncStatus == '同步上传文章成功')}">
|
||||||
<i class="haofont hao-icon-rss post-meta-icon"></i>博客独享
|
<i class="haofont hao-icon-rss post-meta-icon"></i>博客独享
|
||||||
</th:block>
|
</th:block>
|
||||||
|
|
||||||
<th:block th:if="${pluginFinder.available('plugin-platforms-sync') && syncStatus == '同步更新文章成功'}">
|
<th:block th:if="${pluginFinder.available('plugin-platforms-sync') && (syncStatus == '同步更新文章成功' || syncStatus == '同步上传文章成功')}">
|
||||||
<i class="haofont hao-icon-weixin1 post-meta-icon"></i>公众号同步
|
<i class="haofont hao-icon-weixin1 post-meta-icon"></i>公众号同步
|
||||||
</th:block>
|
</th:block>
|
||||||
</span>
|
</span>
|
||||||
|
|
Loading…
Reference in New Issue