MediaWiki:Gadget-SearchFocus.js: Difference between revisions

Want an adless experience? Log in or Create an account.
addOnloadHook -> jQuery
(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();
     });
     });
}
}