MediaWiki:Gadget-SearchFocus.js: Difference between revisions
Jump to navigation
Jump to search
Want an adless experience? Log in or Create an account.
(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(); | ||
}); | }); | ||
} | } |
Latest revision as of 04:43, March 19, 2017
if (mw.config.get('wgPageName') == "Main_Page") { jQuery(function() { document.getElementById("searchInput").focus(); }); }