Codedex题目翻译器

2026-04-29 09:261阅读0评论SEO问题
  • 内容介绍
  • 文章标签
  • 相关推荐
问题描述:

// ==UserScript== // @name Codedex 自动翻译(Chrome Translator API / Google 降级) // @namespace https://github.com/yourname/codedex-translator // @version 5.0.0 // @description 检测到 .challenge-container 加载完毕后自动翻译,无需按钮 // @author You // @match https://www.codedex.io/* // @grant GM_xmlhttpRequest // @connect translate.googleapis.com // @run-at document-idle // ==/UserScript== (async function () { 'use strict'; const CONFIG = { sourceLang: 'en', targetLang: 'zh', targetLangGoogle: 'zh-CN', }; const SELECTORS = [ '.challenge-container h2', '.challenge-container h3', '.challenge-container p', '.challenge-container li', '.challenge-container .clone p', ]; // ─── Chrome Translator API ─────────────────────────────────────────────────── let chromeTranslator = null; async function initChromeTranslator() { if ('Translator' in self) { try {

阅读全文
标签:软件开发
问题描述:

// ==UserScript== // @name Codedex 自动翻译(Chrome Translator API / Google 降级) // @namespace https://github.com/yourname/codedex-translator // @version 5.0.0 // @description 检测到 .challenge-container 加载完毕后自动翻译,无需按钮 // @author You // @match https://www.codedex.io/* // @grant GM_xmlhttpRequest // @connect translate.googleapis.com // @run-at document-idle // ==/UserScript== (async function () { 'use strict'; const CONFIG = { sourceLang: 'en', targetLang: 'zh', targetLangGoogle: 'zh-CN', }; const SELECTORS = [ '.challenge-container h2', '.challenge-container h3', '.challenge-container p', '.challenge-container li', '.challenge-container .clone p', ]; // ─── Chrome Translator API ─────────────────────────────────────────────────── let chromeTranslator = null; async function initChromeTranslator() { if ('Translator' in self) { try {

阅读全文
标签:软件开发