MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
(Initialize server toggle, removed legacy mobile stylesheets loader) |
(Replaced /w/index.php calls that result in 301 redirects) |
||
Line 31: | Line 31: | ||
if (document.getElementsByClassName("server-toggle-parent").length > 0 || document.getElementsByClassName("server-toggle-jp-button").length > 0 || document.getElementsByClassName("tabber__tabs").length > 0) { |
if (document.getElementsByClassName("server-toggle-parent").length > 0 || document.getElementsByClassName("server-toggle-jp-button").length > 0 || document.getElementsByClassName("tabber__tabs").length > 0) { |
||
//console.log("Loading server switching js"); |
//console.log("Loading server switching js"); |
||
mw.loader.load ( '/ |
mw.loader.load ( '/wiki/MediaWiki:ServerToggle.js?action=raw&ctype=text/javascript' ); |
||
} |
} |
||
Line 49: | Line 49: | ||
} |
} |
||
if (mw.config.get("wgPageName") === "Characters" || mw.config.get("wgPageName") === "Characters_StatChart") { |
if (mw.config.get("wgPageName") === "Characters" || mw.config.get("wgPageName") === "Characters_StatChart") { |
||
mw.loader.load( '/ |
mw.loader.load( '/wiki/MediaWiki:CharacterTable.js?action=raw&ctype=text/javascript' ); |
||
} |
} |
||
if (mw.config.get("wgPageName") === "An_Unconcealed_Heart/Mitcher") { |
if (mw.config.get("wgPageName") === "An_Unconcealed_Heart/Mitcher") { |
||
mw.loader.load( '/ |
mw.loader.load( '/wiki/MediaWiki:Mitcher.js?action=raw&ctype=text/javascript' ); |
||
} |
} |
||
if (mw.config.get("wgPageName") === "A_Game_Before_the_New_Year's_Feast_~_One-and-Done_Match_~/Junby") { |
if (mw.config.get("wgPageName") === "A_Game_Before_the_New_Year's_Feast_~_One-and-Done_Match_~/Junby") { |
||
mw.loader.load( '/ |
mw.loader.load( '/wiki/MediaWiki:Junby.js?action=raw&ctype=text/javascript' ); |
||
} |
} |
||
const title_split = mw.config.get('wgTitle').toLowerCase().split("/"); |
const title_split = mw.config.get('wgTitle').toLowerCase().split("/"); |
||
if (mw.config.get('wgNamespaceNumber') === 0 && title_split.length === 2 && title_split[1] === 'momotalk') { |
if (mw.config.get('wgNamespaceNumber') === 0 && title_split.length === 2 && title_split[1] === 'momotalk') { |
||
mw.loader.load( '/ |
mw.loader.load( '/wiki/MediaWiki:MomotalkChoice.js?action=raw&ctype=text/javascript' ); |
||
} |
} |
||
Line 68: | Line 68: | ||
/* Character stat calc & affection table */ |
/* Character stat calc & affection table */ |
||
mw.loader.load( '/ |
mw.loader.load( '/wiki/MediaWiki:StatCalc.js?action=raw&ctype=text/javascript' ); |
||
Line 174: | Line 174: | ||
/* XP tables */ |
/* XP tables */ |
||
mw.loader.load( '/ |
mw.loader.load( '/wiki/MediaWiki:XPtable.js?action=raw&ctype=text/javascript' ); |