Участник:Mike Novikoff/common.js: различия между версиями

Содержимое удалено Содержимое добавлено
chances are that the default Gadget-directLinkToCommons.js will be usable at long last
oops, includes() is not compatible with Opera Presto
(не показана 1 промежуточная версия этого же участника)
Строка 19:
//
mw.loader.using(['jquery.confirmable'],function(){ $('.mw-rollback-link > a').confirmable(); });
 
 
// Try to get Wikificator running without any (visible) toolbars
if ($.inArray( mw.config.get('wgAction'), ['edit', 'submit'] ) !== -1) {
 
// [https://ru.wikipedia.org/wiki/MediaWiki:Gadget-mediawiki.toolbar.js]
// is an API for the actual "old toolbar" which is
// [https://ru.wikipedia.org/wiki/MediaWiki:Gadget-LegacyToolbar2006.js]
//
// Load the former (it will be used by Wikificator) and pretend
// that the latter is loaded as well (since Wikificator checks it)
// see <https://ru.wikipedia.org/?diff=96161584>
//
$.when( mw.loader.using([ 'ext.gadget.mediawiki.toolbar' ]) ).then( function() {
mw.hook( 'legacy.toolbar.ready' ).fire();
});
}