mirror of
https://mirror.ghproxy.com/https://github.com/CxJuice/ScWeb_Chinese_Translate.git
synced 2024-12-23 06:13:45 +08:00
Update userscript.js
This commit is contained in:
parent
bc6339b7c8
commit
50494a7124
@ -1,13 +1,31 @@
|
||||
// ==UserScript==
|
||||
// ==UserScript==
|
||||
// @name UEX汉化脚本
|
||||
// @namespace Violentmonkey Scripts
|
||||
// @match https://uexcorp.space/*
|
||||
// @grant none
|
||||
// @version 0.2
|
||||
// @version 0.8.0
|
||||
// @license GNU GPLv3
|
||||
// @author CxJuice
|
||||
// @description 2022/7/28 12:48:01
|
||||
|
||||
// @match https://uexcorp.space/*
|
||||
// @match https://www.erkul.games/*
|
||||
// @grant GM_xmlhttpRequest
|
||||
// @grant GM_getResourceText
|
||||
// @resource zh-CN https://cdn.jsdelivr.net/gh/CxJuice/Uex_Chinese_Translate@main/zh-CN-uex1.7.json
|
||||
// @require https://cdn.bootcdn.net/ajax/libs/timeago.js/4.0.2/timeago.full.min.js
|
||||
// @require https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js
|
||||
// ==/UserScript==
|
||||
window.addEventListener('load', function(event) {
|
||||
// 当页面加载完成时,执行我们的脚本
|
||||
myScript();
|
||||
});
|
||||
|
||||
// 监听页面中的鼠标点击事件
|
||||
document.addEventListener('click', function(event) {
|
||||
// 当发生鼠标点击事件时,执行我们的脚本
|
||||
myScript();
|
||||
});
|
||||
function myScript() {
|
||||
(function() {
|
||||
'use strict';
|
||||
|
||||
@ -64,10 +82,11 @@
|
||||
function shoudTranslateEl(el) {
|
||||
const blockIds = ["readme", "wiki-content"];
|
||||
const blockClass = [
|
||||
"mat-icon",
|
||||
"CodeMirror",
|
||||
"css-truncate" // 过滤文件目录
|
||||
];
|
||||
const blockTags = ["CODE", "SCRIPT", "LINK", "IMG", "svg", "TABLE", "ARTICLE", "PRE"];
|
||||
const blockTags = [];
|
||||
|
||||
if(blockTags.includes(el.tagName)) {
|
||||
return false;
|
||||
@ -179,4 +198,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
})();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user