Aurora Lemon(讨论 | 贡献) (撤销Aurora Lemon(讨论)的版本9652) 标签:撤销 已被回退 |
Aurora Lemon(讨论 | 贡献) 小无编辑摘要 |
||
(未显示同一用户的1个中间版本) | |||
第1行: | 第1行: | ||
/** | /** | ||
* HydCraft Wiki MediaWiki Common JavaScript | * HydCraft Wiki MediaWiki Common JavaScript | ||
* | |||
* @description If you are interested in us, feel free to add us as a friend and chat with us~ | * @description If you are interested in us, feel free to add us as a friend and chat with us~ | ||
* @description 如果您对我们有兴趣,欢迎和我们加个好友聊聊天喵~ | * @description 如果您对我们有兴趣,欢迎和我们加个好友聊聊天喵~ | ||
第15行: | 第16行: | ||
const pageScripts = { | const pageScripts = { | ||
'首页': 'MediaWiki:Mainpage.js', | '首页': 'MediaWiki:Mainpage.js', | ||
'玩家列表': 'MediaWiki:Playerlist.js', | '玩家列表': 'MediaWiki:Playerlist.js', | ||
'HydCraft_Wiki:仪表盘': 'MediaWiki:LoadDH.js', | 'HydCraft_Wiki:仪表盘': 'MediaWiki:LoadDH.js', |
2024年4月5日 (五) 03:06的最新版本
/**
* HydCraft Wiki MediaWiki Common JavaScript
*
* @description If you are interested in us, feel free to add us as a friend and chat with us~
* @description 如果您对我们有兴趣,欢迎和我们加个好友聊聊天喵~
*/
(function() {
/**
* 避免站点名称被浏览器自动翻译误伤
*/
$(".mw-logo-wordmark, .footer-belong__hydrlab").attr("translate", "no");
/**
* 加载页面对应的脚本
*/
const pageScripts = {
'首页': 'MediaWiki:Mainpage.js',
'玩家列表': 'MediaWiki:Playerlist.js',
'HydCraft_Wiki:仪表盘': 'MediaWiki:LoadDH.js',
'HydCraft_Wiki:玩家档案': 'MediaWiki:LoadDH.js',
'HydCraft_Wiki:统计': 'MediaWiki:LoadDH.js',
'HydCraft_Wiki:信息申报': 'MediaWiki:LoadDH.js',
'HydCraft_Wiki:查询': 'MediaWiki:LoadDH.js',
'HydCraft_Wiki:组织关系': 'MediaWiki:LoadDH.js',
'Topic:一码通恒': 'MediaWiki:LoadYHECode.js'
};
const currentPageName = mw.config.get('wgPageName');
const scriptToImport = pageScripts[currentPageName];
if (scriptToImport)
importScript(scriptToImport);
})();