您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Prioritize Japanese for Han unification (Can be edited to prioritize other langs)
当前为
// ==UserScript== // @name Prioritize Japanese glyphs on Japanese Websites // @namespace https://github.com/patarapolw/wanikani-userscript // @version 0.1.2 // @description Prioritize Japanese for Han unification (Can be edited to prioritize other langs) // @author polv // @license MIT // @match https://community.wanikani.com/* // @match https://*.goo.ne.jp/* // @match https://*.weblio.jp/* // @match https://eow.alc.co.jp/* // @match https://www.kanjipedia.jp/* // @match http://yourei.jp/* // @match https://youglish.com/pronounce/*/japanese? // @match https://immersionkit.com/* // @match https://*.immersionkit.com/* // @icon https://www.google.com/s2/favicons?sz=64&domain=eastasiastudent.net // @grant none // ==/UserScript== (() => { // src/jp-glyphs.ts var DEFAULT_LANG = "ja-JP"; new MutationObserver((muts) => { for (const mut of muts) { mut.addedNodes.forEach((n) => { if (n instanceof HTMLElement) { injectLang(n); } }); } }).observe(document.body, { childList: true, subtree: true }); injectLang(document.body); function injectLang(el, lang = DEFAULT_LANG) { el.querySelectorAll(":not([lang])").forEach((it) => { let parent = it.parentElement; while (parent) { const lang0 = parent.getAttribute("lang"); if (lang0 && lang0 !== lang && lang0 !== "en" && parent.tagName.toLocaleUpperCase() !== "HTML") { return; } parent = parent.parentElement; } it.setAttribute("lang", lang); }); } })();