MediaWiki:Gadget-SearchFocus.js: Difference between revisions

From Zelda Dungeon Wiki
Jump to navigation Jump to search
Want an adless experience? Log in or Create an account.
(Created page with "if (wgPageName == "Main_Page") { addOnloadHook(function() { document.getElementById("searchInput").focus(); }); }")
 
(addOnloadHook -> jQuery)
Line 1: Line 1:
if (wgPageName == "Main_Page") {
if (wgPageName == "Main_Page") {
     addOnloadHook(function() {
     jQuery(function() {
         document.getElementById("searchInput").focus();
         document.getElementById("searchInput").focus();
     });
     });
}
}

Revision as of 03:20, January 26, 2017

if (wgPageName == "Main_Page") {
    jQuery(function() {
        document.getElementById("searchInput").focus();
    });
}