Skip to content

Instantly share code, notes, and snippets.

@tpenguinltg
Created May 10, 2016 00:26
Show Gist options
  • Save tpenguinltg/ffdede865cfa261ced89a9d75045955a to your computer and use it in GitHub Desktop.
Save tpenguinltg/ffdede865cfa261ced89a9d75045955a to your computer and use it in GitHub Desktop.
Add accesskey shortcut to Google search
// ==UserScript==
// @name Add accesskey shortcut to Google search
// @namespace tpenguinltg
// @description Adds accesskey+f as shortcut for accessing Google search bar
// @include https://www.google.*
// @version 1
// @grant none
// ==/UserScript==
var searchBar = document.querySelector("input[name=q]");
if (searchBar) {
searchBar.accessKey="f";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment