MediaWiki:WEF AllEditors.js

Материал из Википедии — свободной энциклопедии
Перейти к навигации Перейти к поиску
Возможно, этот код документирован.

После сохранения или недавних изменений очистите кэш браузера.

/**
 * This JavaScript is a loader of EditionEditor from WE-Framework, works only
 * for other sites (ruwiki users should use local gadgets)
 * 
 * @see https://github.com/vlsergey/WE-Framework
 * @author vlsergey
 */
( function() {

	mw.loader.using( [ //
	'mediawiki.storage',
	'jquery.ui', //
	'jquery.ui', //
	'jquery.uls.data', //
	'mediawiki.ForeignApi', //
	], function() {
		// Opt out of error logging before loading. User:Vlsergey/wef.js is responsible for 10,000+ errors with message:
		// "TypeError: Cannot read properties of undefined (reading 'setAttribute')"
		// This can be removed if reported fixed.
		mw.storage.session.set( 'client-error-opt-out', '1' );
		mediaWiki.loader.load( '//ru.wikipedia.org/w/index.php?title=User:Vlsergey/wef.js&action=raw&ctype=text/javascript' );
		console.log( '[WE-F] all WEF modules were loaded' );
	}, function() {
		mw.warn( '[WE-F] unable to load WEF functions: ' );
		mw.warn( arguments );
	} );

} )();