MediaWiki:Common.js: Difference between revisions

From Exagear International
Jump to navigation Jump to search
No edit summary
Tag: Reverted
No edit summary
Tag: Manual revert
 
Line 1: Line 1:
/* Any JavaScript here will be loaded for all users on every page load. */
/* Any JavaScript here will be loaded for all users on every page load. */
mw.loader.load( 'https://www.exagear.wiki/index.php?title=MediaWiki:Dark-mode.js&action=raw&ctype=text/javascript' ); // [[User:Volker_E._(WMF)/dark-mode.js]]
if ( mw.config.get( 'wgIsMainPage' )) {
if ( mw.config.get( 'wgIsMainPage' )) {



Latest revision as of 23:00, 29 November 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;



// alert(language);

if (language.indexOf('ru') > -1) {
document.location.href = 'https://www.exagear.wiki/index.php?title=Main_Page(ru)';

} else {
document.location.href = 'https://www.exagear.wiki/index.php?title=Main_Page';

}
}