Update userscript.js

This commit is contained in:
CxJuice 2023-01-28 03:54:19 +08:00 committed by GitHub
parent 023013aa52
commit be23ca1b32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,12 +1,12 @@
// ==UserScript== // ==UserScript==
// @name UEX汉化脚本 // @name UEX——CN
// @namespace Violentmonkey Scripts // @name:zh-CN UEX汉化脚本
// @match https://uexcorp.space/* // @namespace https://github.com/CxJuice/Uex_Chinese_Translate
// @grant none
// @version 0.8.0 // @version 0.8.0
// @license GNU GPLv3 // @description UEX——CN
// @description:zh UEX汉化插件
// @description:zh-CN UEX汉化插件
// @author CxJuice // @author CxJuice
// @description 2022/7/28 12:48:01
// @match https://uexcorp.space/* // @match https://uexcorp.space/*
// @match https://www.erkul.games/* // @match https://www.erkul.games/*
// @grant GM_xmlhttpRequest // @grant GM_xmlhttpRequest
@ -26,6 +26,7 @@ document.addEventListener('click', function(event) {
myScript(); myScript();
}); });
function myScript() { function myScript() {
(function() { (function() {
'use strict'; 'use strict';
@ -80,13 +81,11 @@ function myScript() {
} }
function shoudTranslateEl(el) { function shoudTranslateEl(el) {
const blockIds = ["readme", "wiki-content"]; const blockIds = [];
const blockClass = [ const blockClass = [
"mat-icon",
"CodeMirror",
"css-truncate" // 过滤文件目录 "css-truncate" // 过滤文件目录
]; ];
const blockTags = []; const blockTags = [ "IMG", "svg"];
if(blockTags.includes(el.tagName)) { if(blockTags.includes(el.tagName)) {
return false; return false;
@ -198,6 +197,5 @@ function myScript() {
} }
} }
} }
})(); })();
} }