友链卡片只转换顶层评论(回复里的同串URL不再被隐藏)
Deploy to Production / pre-check (push) Successful in 53s
Deploy to Production / build (push) Canceled after 3m23s
Deploy to Production / deploy-edgeone (push) Canceled after 0s
Deploy to Production / finalize (push) Canceled after 0s
Deploy to Production / notify-failure (push) Canceled after 0s

This commit is contained in:
zqlit committed 2026-10-03 17:23:46 +08:00
1 parent 627b6e6512
commit 63fd5641d5
1 file changed
+2
+2
View File
@@ -722,6 +722,8 @@ artalk.on('comment-rendered', function(node) {
if (!d2 || !el2) return;
var content = String(d2.content || '').trim().replace(/\/+$/, '').toLowerCase();
if (content !== 'https://usj.cc/link-apply') return;
// 只转换顶层评论:回复里出现同一串 URL 不该被吃掉(也避免出现游离的卡片)
if (d2.rid) return;
// 幂等 + 自愈:class 每次渲染都补一次(CSS 靠它隐藏整条评论),
// 卡片始终挂在评论列表"上方"(.atk-list-body 的第一个子节点),