MediaWiki:Common.js: Unterschied zwischen den Versionen

Aus ageofempires-wiki.de
Zur Navigation springen Zur Suche springen
(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...")
 
 
(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' ) ) {
wgPageName == 'Main_Page' ||
+
  $( function () {
typeof( wgMainPageTitle ) != 'undefined' && wgPageName == wgMainPageTitle
+
    $( '#searchInput' ).focus();
)
+
  } );
{
 
addOnloadHook( function() {
 
document.getElementById( '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();
  } );
}