查看“MediaWiki:Gadget-noteTA.js”的源代码
因为以下原因,您没有权限编辑本页:
您可以查看与复制此页面的源代码。
"use strict";
// <pre>
/*
* 引自 https://zh.wikipedia.org/wiki/MediaWiki:Gadget-noteTA.js https://zh.wikipedia.org/wiki/MediaWiki:Gadget-noteTAvector.js
* User:AnnAngela做了整合与现代化
*/
mw.hook("wikipage.content").add(() => {
const map = {
zh: "(不转换)",
"zh-hans": "(简体)",
"zh-hant": "(繁体)",
};
const replaceReg = RegExp(`^\\/(?:${Object.keys(map).join("|")})`);
const name = Object.keys(map);
const api = new mw.Api();
$(() => {
if ($("#noteTA-vector-menu-tabs")[0]) {
return;
}
$("#p-variants").nextAll('.noteTA-menu, [class*="mw-indicator"], [id*="mw-indicator"]').remove();
const noteTAIndicator = $("[id^=mw-indicator-noteTA-], [id^=mobile-noteTA-]").hide();
000
1:0