Jump to content

Wikipedia:Main Page/searchfocus.js

From Wikipedia, the free encyclopedia
// ==UserScript==
// @name           Wikipedia - Main Page search
// @namespace      Wikipedia
// @description    This script focuses (sets the cursor in) the search box on the English Wikipedia's Main Page
// @include        http://en.wikipedia.org/wiki/Main_Page
// @include        http://en.wikipedia.org/w/index.php?title=Main_Page
// @author         Gracenotes
// @license        Public domain
// ==/UserScript==

window.addEventListener("load", function() {
	document.getElementById("searchInput").focus();
}, false)