MediaWiki:Common.js: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Kevin (Diskussion | Beiträge) (Created page with "→Any JavaScript here will be loaded for all users on every page load.: // Imported from http://en.wikipedia.org/wiki/MediaWiki:Gadget-searchFocus.js as of June 4, 2009 if...") |
Kevin (Diskussion | Beiträge) |
||
(Eine dazwischenliegende Version desselben Benutzers wird nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
/* Any JavaScript here will be loaded for all users on every page load. */ | /* Any JavaScript here will be loaded for all users on every page load. */ | ||
// Imported from http://en.wikipedia.org/wiki/MediaWiki:Gadget-searchFocus.js as of June 4, 2009 | // Imported from http://en.wikipedia.org/wiki/MediaWiki:Gadget-searchFocus.js as of June 4, 2009 | ||
− | if ( | + | if ( mw.config.get( 'wgIsMainPage' ) ) { |
− | + | $( function () { | |
− | + | $( '#searchInput' ).focus(); | |
− | ) | + | } ); |
− | { | ||
− | |||
− | |||
− | |||
} | } |
Aktuelle Version vom 6. Mai 2020, 03:15 Uhr
/* Any JavaScript here will be loaded for all users on every page load. */
// Imported from http://en.wikipedia.org/wiki/MediaWiki:Gadget-searchFocus.js as of June 4, 2009
if ( mw.config.get( 'wgIsMainPage' ) ) {
$( function () {
$( '#searchInput' ).focus();
} );
}