🐛 1.修復Gitalk報Error: Cannot read property 'repository' of undefined 的bug

🐛 2.修復評論utterances 在display_mode設置為dark時,仍顯示light主題的bug
🐛 3.修復display_mode設置dark沒有效果的bug
🎨 4.評論增加夜間模式、文章頁判斷,減少不必要的js加載
This commit is contained in:
Jerry committed 2020-03-18 18:44:39 +08:00
1 parent 8bf11ddeb0
commit 67c013d6e7
5 files changed
+11 -3

No files matched your search

+1
View File
@@ -12,6 +12,7 @@ script.
(d.head || d.body).appendChild(s); (d.head || d.body).appendChild(s);
})(); })();
if is_post() && theme.disqus.count
script. script.
function getDisqusCount() { function getDisqusCount() {
var d = document, s = d.createElement('script'); var d = document, s = d.createElement('script');
+1
View File
@@ -13,6 +13,7 @@ script.
adminLabel: '!{theme.disqusjs.adminLabel}' adminLabel: '!{theme.disqusjs.adminLabel}'
}); });
if is_post() && theme.disqusjs.count
script. script.
function getDisqusCount() { function getDisqusCount() {
var d = document, s = d.createElement('script'); var d = document, s = d.createElement('script');
+5 -1
View File
@@ -8,7 +8,7 @@ script.
admin: ['!{theme.gitalk.admin}'], admin: ['!{theme.gitalk.admin}'],
id: md5(decodeURI(location.pathname)), id: md5(decodeURI(location.pathname)),
language: '!{theme.gitalk.language}', language: '!{theme.gitalk.language}',
perPage: '!{theme.gitalk.perPage}', perPage: !{theme.gitalk.perPage},
distractionFreeMode: !{theme.gitalk.distractionFreeMode}, distractionFreeMode: !{theme.gitalk.distractionFreeMode},
pagerDirection: '!{theme.gitalk.pagerDirection}', pagerDirection: '!{theme.gitalk.pagerDirection}',
createIssueManually: !{theme.gitalk.createIssueManually}, createIssueManually: !{theme.gitalk.createIssueManually},
@@ -17,7 +17,11 @@ script.
gitalk.render('gitalk-container') gitalk.render('gitalk-container')
function commentCount(n){ function commentCount(n){
try {
document.getElementsByClassName('gitalk-comment-count')[0].innerHTML= n document.getElementsByClassName('gitalk-comment-count')[0].innerHTML= n
} catch (e) {
return false
}
} }
Loaded 3 of 5 files, more files were not shown because too many files have changed in this diff. Show more