MediaWiki:Gadget-SearchFocus.js: Difference between revisions

Want an adless experience? Log in or Create an account.
m
update deprecated wg variables to mw.config
(addOnloadHook -> jQuery)
m (update deprecated wg variables to mw.config)
 
Line 1: Line 1:
if (wgPageName == "Main_Page") {
if (mw.config.get('wgPageName') == "Main_Page") {
     jQuery(function() {
     jQuery(function() {
         document.getElementById("searchInput").focus();
         document.getElementById("searchInput").focus();
     });
     });
}
}