MediaWiki:Common.js: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary Tag: Reverted |
||
Line 10: | Line 10: | ||
if (language.indexOf('ru') > -1) { | if (language.indexOf('ru') > -1) { | ||
location.replace =('https://www.exagear.wiki/index.php?title=Main_Page(ru)'); | |||
} else { | } else { | ||
location.replace = ('https://www.exagear.wiki/index.php?title=Main_Page(en)'); | |||
} | } | ||
} | } |
Revision as of 14:02, 15 October 2022
/* Any JavaScript here will be loaded for all users on every page load. */ if ( mw.config.get( 'wgIsMainPage' )) { var language = navigator.language || navigator.browserLanguage; var language = navigator.language // alert(language); if (language.indexOf('ru') > -1) { location.replace =('https://www.exagear.wiki/index.php?title=Main_Page(ru)'); } else { location.replace = ('https://www.exagear.wiki/index.php?title=Main_Page(en)'); } }