Skip to content

Instantly share code, notes, and snippets.

@Lomanic
Forked from stcruy/Google_Lucky_Button_Fix.user.js
Last active November 17, 2016 10:00
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 Lomanic/f51855f20d8e9024d988adb9ab227254 to your computer and use it in GitHub Desktop.
Save Lomanic/f51855f20d8e9024d988adb9ab227254 to your computer and use it in GitHub Desktop.
Google Lucky Button Fix - Greasemonkey script
// ==UserScript==
// @name Google Lucky Button Fix
// @namespace -
// @version 2
// @description On Google search result pages that have "&btnI" in the url, automatically redirect to the first hit.
// @include /^https?:\/\/(?:encrypted|www)\.google\.[^/]+\/(?:$|[#?]|search|webhp).*&btnI.*/
// @grant none
// ==/UserScript==
var firstLink = document.querySelector("#search .rc a").href;
window.location.replace(firstLink);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment