mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-12 22:17:06 +08:00
✨ disqus/disqusjs/facebook comments 可隨夜間模式按鈕切換而轉換主題
🐛 修復pjax下valine評論顯示不正常的bugs 🐛 修復facebook comments 在手機下寬度不是100%的bugs
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
script.
|
||||
function loadGitalk () {
|
||||
function addGitalkSource () {
|
||||
const ele = document.createElement('link')
|
||||
ele.rel = 'stylesheet'
|
||||
ele.href= '!{url_for(theme.CDN.gitalk_css)}'
|
||||
document.getElementsByTagName('head')[0].appendChild(ele)
|
||||
}
|
||||
function addGitalkSource () {
|
||||
const ele = document.createElement('link')
|
||||
ele.rel = 'stylesheet'
|
||||
ele.href= '!{url_for(theme.CDN.gitalk_css)}'
|
||||
document.getElementsByTagName('head')[0].appendChild(ele)
|
||||
}
|
||||
|
||||
function loadGitalk () {
|
||||
function initGitalk () {
|
||||
var gitalk = new Gitalk({
|
||||
clientID: '!{theme.gitalk.client_id}',
|
||||
@@ -30,13 +30,11 @@ script.
|
||||
addGitalkSource()
|
||||
$.getScript('!{url_for(theme.CDN.gitalk)}', initGitalk)
|
||||
}
|
||||
|
||||
function commentCount(n){
|
||||
try {
|
||||
document.getElementsByClassName('gitalk-comment-count')[0].innerHTML= n
|
||||
} catch (e) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
function commentCount(n){
|
||||
if (document.querySelector('#post-meta .gitalk-comment-count')) {
|
||||
document.querySelector('#post-meta .gitalk-comment-count').innerHTML= n
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user