Skip to content

Instantly share code, notes, and snippets.

@ttscoff
Created December 16, 2018 19:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ttscoff/4e96825d4ac1ec947a108e606696a554 to your computer and use it in GitHub Desktop.
Save ttscoff/4e96825d4ac1ec947a108e606696a554 to your computer and use it in GitHub Desktop.
A snippet for use with a browser shortcut manager to focus the amazon search field and set the department to all departments. Because it's got dam annoying that there's no keyboard shortcut for that.
if (document.location.href.match(/amazon.com/)) {
document.querySelector("#searchDropdownBox").selectedIndex = 0;
document.querySelector("#twotabsearchtextbox").select();
}
@ttscoff
Copy link
Author

ttscoff commented Dec 16, 2018

I use this if statement along with SearchFocus, performing just the above if I'm on Amazon. Triggered with Shortcut Manager for Chrome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment