Skip to content

Commit

Permalink
同步更新到 main(greasyfork).user.js
Browse files Browse the repository at this point in the history
  • Loading branch information
maboloshi committed Nov 28, 2021
1 parent 22e7281 commit 2e1b36d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main(greasyfork).user.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@
} else if (el.tagName === 'BUTTON' && el.hasAttribute('data-confirm-cancel-text')) {
transElement(el, 'data-confirm-cancel-text', true); // 取消按钮 提醒

} else if (el.hasAttribute('cancel-confirm-text')) {
transElement(el, 'cancel-confirm-text', true); // 取消按钮 提醒
} else if (el.tagName === 'OPTGROUP') { // 翻译 <optgroup> 的 label 属性
transElement(el, 'label');
}
Expand All @@ -133,7 +135,9 @@
traverseNode(el); // 遍历子节点
}
} else if (el.nodeType === Node.TEXT_NODE) { // 文本节点翻译
transElement(el, 'data');
if (el.length <= 500){ // 修复 许可证编辑框初始化载入内容被翻译
transElement(el, 'data');
}
}
}
}
Expand Down

0 comments on commit 2e1b36d

Please sign in to comment.