diff --git a/CHANGELOG.md b/CHANGELOG.md index af4f42a..769d538 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,9 @@ # 更新日志 -## [1.11.2] - 2024-07-02 -### 新增 +## [1.11.3] - 2024-08-19 +### 修正 -* 查看内容:更新之家表情 +* 查看内容:解决了评论投票状态未完全更新的问题 ## [待开发] 1. 设置评论黑名单,自动模糊 @@ -15,6 +15,11 @@ 1. 显示评论区用户机型 2. 评论翻页功能 +## [1.11.2] - 2024-07-02 +### 新增 + +* 查看内容:更新之家表情 + ## [1.11.1] - 2024-06-26 ### 新增 diff --git a/package.json b/package.json index 8d82a7e..e2aafe1 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "ith2ome", "displayName": "ITH2Ome", "description": "IT之家第三方插件,划水特供版", - "version": "1.11.2", + "version": "1.11.3", "author": "https://github.com/Tai-Zhou", "repository": { "type": "git", diff --git a/src/extension.ts b/src/extension.ts index 28192e2..3032b97 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -214,25 +214,30 @@ function commentVoteFormat(commentId: number, reply: number, support: number, ag return `回复(${reply})支持(${support})反对(${against})`; } -function commentItemFormat(comment: commentJSON): string { // 生成评论 +function commentItemFormat(comment: commentJSON, idPrefix: string): string { // 生成评论 for (let i in ithomeEmoji) comment.elements[0].content = comment.elements[0].content.replace(RegExp('\\[' + ithomeEmoji[i] + '\\]', 'g'), ''); let commentClass = ""; if (blurNegativeComment && comment.support < comment.against) commentClass = "blur"; - return '
  • ' + (showAvatar ? `` : '') + `
    ${comment.userInfo.userNick} Lv.${comment.userInfo.level}|${comment.city}
    ${comment.floorStr} @ ${new Date(comment.postTime).toLocaleString('zh-CN')}
    ${comment.referText ? '
    ' + comment.referText + '
    ' : '
    '}${comment.replyFloorStr ? commentReplayFormt(comment) : ''}${linkFormat(comment.elements[0].content)}${commentPictureFormat(comment.pictures)}
    ${commentVoteFormat(comment.id, comment.children.length, comment.support, comment.against, comment.voteStatus)}
    `; + return '
  • ' + (showAvatar ? `` : '') + `
    ${comment.userInfo.userNick} Lv.${comment.userInfo.level}|${comment.city}
    ${comment.floorStr} @ ${new Date(comment.postTime).toLocaleString('zh-CN')}
    ${comment.referText ? '
    ' + comment.referText + '
    ' : '
    '}${comment.replyFloorStr ? commentReplayFormt(comment) : ''}${linkFormat(comment.elements[0].content)}${commentPictureFormat(comment.pictures)}
    ${commentVoteFormat(comment.id, comment.children.length, comment.support, comment.against, comment.voteStatus)}
    `; } function commentFormat(commentList: commentJSON[], commentTitle: string): string { // 评论JSON生成列表 if (commentList.length == 0) return ''; let commentContent = `

    ${commentTitle}