跳转到内容

MediaWiki:Gadget-site-lib.js

来自萌娘共享
AnnAngela-dbot留言 | 贡献2025年7月24日 (四) 21:15的版本 (代码变动:103d1a56 - feat: rename (#594) by U:AnnAngela, co-authored-by: GH:github-actions[bot])

注意:在发布之后,您可能需要清除浏览器缓存才能看到所作出的更改的影响。

  • Firefox或Safari:按住Shift的同时单击刷新,或按Ctrl-F5Ctrl-R(Mac为⌘-R
  • Google Chrome:Ctrl-Shift-R(Mac为⌘-Shift-R
  • Edge:按住Ctrl的同时单击刷新,或按Ctrl-F5
/**
 * -------------------------------------------------------------------------
 * !!! DON'T MODIFY THIS PAGE MANUALLY, YOUR CHANGES WILL BE OVERWRITTEN !!!
 * -------------------------------------------------------------------------
 */
var _addText = '{{GHIACode|page=GHIA:MoegirlPediaInterfaceCodes/blob/master/src/gadgets/site-lib/Gadget-site-lib.js|user=[[U:AnnAngela]]|co-authors=GH:github-actions[bot]|longId=103d1a563ea4ccc8ff29fb55c9bcd88329a56eb5|shortId=103d1a56|summary=feat: rename (#594)|body=<nowiki>Co-authored-by: github-actions[bot] <41898282+github-actions[bot]📧users.noreply.github.com></nowiki>}}'; 

/* <pre> */

"use strict";
window.wgUXS = (wg, hans, hant, cn, tw, hk, sg, zh, mo, my) => {
    const ret = {
        zh: zh || hans || hant || cn || tw || hk || sg || mo || my,
        "zh-hans": hans || cn || sg || my,
        "zh-hant": hant || tw || hk || mo,
        "zh-cn": cn || hans || sg || my,
        "zh-sg": sg || hans || cn || my,
        "zh-tw": tw || hant || hk || mo,
        "zh-hk": hk || hant || mo || tw,
        "zh-mo": mo || hant || hk || tw,
    };
    return ret[wg] || zh || hans || hant || cn || tw || hk || sg || mo || my;
};
window.wgULS = (hans, hant, cn, tw, hk, sg, zh, mo, my) => window.wgUXS(mw.config.get("wgUserLanguage"), hans, hant, cn, tw, hk, sg, zh, mo, my);
window.wgUVS = (hans, hant, cn, tw, hk, sg, zh, mo, my) => window.wgUXS(mw.config.get("wgUserVariant"), hans, hant, cn, tw, hk, sg, zh, mo, my);
mw.log.deprecate(window, "addPortletLink", (...args) => mw.util.addPortletLink.bind(mw.util)(...args), "Use mw.util.addPortletLink() instead");
mw.log.deprecate(window, "getURLParamValue", (...args) => mw.util.getParamValue.bind(mw.util)(...args), "Use mw.util.getParamValue() instead");
mw.log.deprecate(window, "hasClass", (element, className) => $(element).hasClass(className), "Use jQuery#hasClass instead");
mw.log.deprecate(window, "importScriptCallback", (page, ready) => libCachedCode.injectCachedCode(`${mw.config.get("wgServer")}${mw.config.get("wgScript")}?title=${mw.util.wikiUrlencode(page)}&action=raw&ctype=text/javascript`, "script").then(ready), "Use `await libCachedCode.injectCachedCode(page, \"script\")` instead");
mw.log.deprecate(window, "importScriptURICallback", (page, ready) => libCachedCode.injectCachedCode(page, "script").then(ready), "Use `await libCachedCode.injectCachedCode(page, \"script\")` instead"); 

/* </pre> */