你现在正在访问的是萌娘百科用于保存和管理图片、音频等媒体文件的子项目萌娘共享,想要回到萌娘百科,请使用浏览器上的返回按钮、或点击这里
“MediaWiki:Gadget-widgetPreload.js”的版本间的差异
星海-interfacebot(讨论 | 贡献) (跨站同步) (1个标签:由机器人或全自动脚本执行的操作) |
AnnAngela-dbot(讨论 | 贡献) (1个标签:由机器人或全自动脚本执行的操作) |
||
第5行: | 第5行: | ||
* ------------------------------------------------------------------------- | * ------------------------------------------------------------------------- | ||
*/ | */ | ||
− | var _addText = '{{GHIACode|page=GHIA:MoegirlPediaInterfaceCodes/blob/master/src/gadgets/widgetPreload/MediaWiki:Gadget-widgetPreload.js|user=[[U:AnnAngela]]|longId= | + | var _addText = '{{GHIACode|page=GHIA:MoegirlPediaInterfaceCodes/blob/master/src/gadgets/widgetPreload/MediaWiki:Gadget-widgetPreload.js|user=[[U:AnnAngela]]|longId=f5b2227a801147f261acc12f7e1e187dbfd3f9ad|shortId=f5b2227|message=style: Remove unnecessary `return`}}'; |
"use strict"; | "use strict"; | ||
第16行: | 第16行: | ||
window.onbeforeunload = undefined; | window.onbeforeunload = undefined; | ||
$(window).off("beforeunload"); | $(window).off("beforeunload"); | ||
− | location.replace("".concat(mw.config.get("wgServer")).concat(mw.config.get("wgScriptPath"), "/index.php?action=edit&title=").concat(mw.config.get("wgPageName").replace(/ |_/g, "").replace(/^([^/]*)[/\\].*$/i, "$1").split(regex).map(function (n) { | + | location.replace("".concat(mw.config.get("wgServer")).concat(mw.config.get("wgScriptPath"), "/index.php?action=edit&title=").concat(mw.config.get("wgPageName").replace(/ |_/g, "").replace(/^([^/]*)[/\\].*$/i, "$1").split(regex).map(function (n) { return toUpperFirstCase(n); }).join(""))); |
− | |||
− | |||
return; | return; | ||
} | } |
2023年3月14日 (二) 10:26的版本
/* <pre> */ /** * ------------------------------------------------------------------------- * !!! DON'T MODIFY THIS PAGE MANUALLY, YOUR CHANGES WILL BE OVERWRITTEN !!! * ------------------------------------------------------------------------- */ var _addText = '{{GHIACode|page=GHIA:MoegirlPediaInterfaceCodes/blob/master/src/gadgets/widgetPreload/MediaWiki:Gadget-widgetPreload.js|user=[[U:AnnAngela]]|longId=f5b2227a801147f261acc12f7e1e187dbfd3f9ad|shortId=f5b2227|message=style: Remove unnecessary `return`}}'; "use strict"; $(function () { var toUpperFirstCase = function (t) { return "".concat("".concat(t[0]).substring(0, 1).toUpperCase()).concat("".concat(t).substring(1)); }; if (mw.config.get("wgNamespaceNumber") === 274 && !mw.config.get("wgCurRevisionId")) { if (mw.config.get("wgAction") === "edit") { var regex = /[-_,./\\]/; if (regex.test(mw.config.get("wgPageName"))) { window.onbeforeunload = undefined; $(window).off("beforeunload"); location.replace("".concat(mw.config.get("wgServer")).concat(mw.config.get("wgScriptPath"), "/index.php?action=edit&title=").concat(mw.config.get("wgPageName").replace(/ |_/g, "").replace(/^([^/]*)[/\\].*$/i, "$1").split(regex).map(function (n) { return toUpperFirstCase(n); }).join(""))); return; } var flag = "wg".concat(mw.config.get("wgTitle")).replace(/ /g, ""); $("#wpTextbox1").val("<noinclude> </noinclude><includeonly><!--{if !isset($".concat(flag, ") || !$").concat(flag, "}--><!--{assign var=\"").concat(flag, "\" value=true scope=\"global\"}--><script>\n\"use strict\";\nwindow.RLQ = window.RLQ || [];\nwindow.RLQ.push(() => {\n\n});\n</script><!--{/if}--></includeonly>")); } if ($("#mw-content-text > .mw-parser-output > .noarticletext")[0]) { $(document.body).addClass("noWidget"); } } }); /* </pre> */