fix: 修正 abcjs 報錯的 bug

This commit is contained in:
Jerry
2025-07-09 13:24:42 +08:00
parent d2eacd2d8a
commit a61e216452
6 changed files with 12 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
script.
(() => {
(() => {
const getCommentUrl = () => {
const eleGroup = document.querySelectorAll('#recent-posts .article-title')
let urlArray = []
@@ -18,7 +18,9 @@ script.
includeReply: false
}).then(function (res) {
document.querySelectorAll('#recent-posts .twikoo-count').forEach((item,index) => {
item.textContent = res[index].count
if (res[index]) {
item.textContent = res[index].count
}
})
}).catch(function (err) {
console.log(err)