19,667
edits
(disabling calls to XEB, as it's obsolete) |
(bringing over search box-focusing code from https://en.wikipedia.org/wiki/MediaWiki:Gadget-searchFocus.js) |
||
| Line 14: | Line 14: | ||
return null; | return null; | ||
} | } | ||
/** &withJS= URL parameter ******* | /** &withJS= URL parameter ******* | ||
* Allow to try custom scripts from MediaWiki space | * Allow to try custom scripts from MediaWiki space | ||
| Line 23: | Line 23: | ||
{ | { | ||
mw.loader.load('/w/index.php?title=' + extraJS + '&action=raw&ctype=text/javascript'); | mw.loader.load('/w/index.php?title=' + extraJS + '&action=raw&ctype=text/javascript'); | ||
} | |||
/* Focus us on the Search box if we're on the Main Page, so we can immediately start typing */ | |||
if (mw.config.get('wgIsMainPage')) | |||
{ | |||
$(function() | |||
{ | |||
$('#searchInput').focus(); | |||
}); | |||
} | } | ||