Difference between revisions of "MediaWiki:Gadget-searchFocus.js"

*>Krinkle
(fix usage of deprecated methods (addOnloadHook, wg-global))
 
Line 1: Line 1:
//  _________________________________________________________________________________________
#REDIRECT [[MediaWiki:Gadget-SearchFocus.js]]
// |                                                                                        |
// |                    === WARNING: GLOBAL GADGET FILE ===                                  |
// |                  Changes to this page affect many users.                                |
// | Please discuss changes on the talk page or on [[Wikipedia_talk:Gadget]] before editing. |
// |_________________________________________________________________________________________|
//
// Imported from [[Wikipedia:FAQ/Main Page]] as of April 1, 2008
 
if ( mw.config.get( 'wgIsMainPage' ) === true ) {
  $( document ).ready( function () {
    $( '#searchInput' ).focus();
  });
}
157

edits