Jump to content

User:LaMagiaaa/lang.js

From Meta, a Wikimedia project coordination wiki

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/*https://ru.wikipedia.org/w/index.php?title=MediaWiki:Gadget-iwrussia.js&oldid=112620348*/

( function () {
	var wgLangPrefs = mw.config.get( 'wgLangPrefs' );
	var usualLangs = [
		"en", "ja", "zh"//, "ru", "de", "it", "es", "eo"
		//"ady", "alt", "av", "ba", "bxr", "ce", "crh", "cv", "kbd", "koi",
		//"krc", "kv", "lbe", "lez", "mdf", "mhr", "mrj", "myv", "olo", "os",
		//"pnt", "sah", "tt", "tyv", "udm", "vep", "xal", "yi"
  	];
	if ( !$.isArray( wgLangPrefs ) ) {
		wgLangPrefs = [];
	}
	for ( var i = 0; i < usualLangs.length; i++ ) {
		if ( $.inArray( usualLangs[ i ], wgLangPrefs ) === -1 ) {
			wgLangPrefs.push( usualLangs[ i ] );
		}
	}
	mw.config.set( 'wgLangPrefs', wgLangPrefs );
}() );