Skip to content
This repository has been archived by the owner on Dec 7, 2021. It is now read-only.

合并tag #17

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
################################################################################
# 此 .gitignore 文件已由 Microsoft(R) Visual Studio 自动创建。
################################################################################

/.vs
14 changes: 11 additions & 3 deletions EhTagBuilder.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,18 @@ function dealTags(response, rowdataset)
console.error("发现无中文翻译行%d - %s:%s",ri,rowdataset.name,tag.name);
}
if (tag.type != 1 && rowTags.some(function(ttag){return ttag.name == tag.name;})) //从数组中搜索任一符合条件的,返回true
{
{
var merge = rowTags.find(function (ttag) { return ttag.name == tag.name; });
if (merge.cname.innerHTML != tag.cname.innerHTML)
merge.cname.innerHTML = merge.cname.innerHTML + " | " + tag.cname.innerHTML;
if (merge.info.innerHTML != tag.info.innerHTML)
merge.info.innerHTML = merge.info.innerHTML + "<hr>" + tag.info.innerHTML;
console.error("发现重复定义行%d - %s:%s",ri,rowdataset.name,tag.name);
}
rowTags.push(tag);
}
else
{
rowTags.push(tag);
}
}
else
{
Expand Down