Skip to content

Instantly share code, notes, and snippets.

@stcruy
Last active November 16, 2016 18:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save stcruy/4f59db3a81c899036fb58a45e5f2928b to your computer and use it in GitHub Desktop.
Save stcruy/4f59db3a81c899036fb58a45e5f2928b 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 http*://www.google.*/*&btnI*
// @grant none
// @require http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js
// ==/UserScript==
///window.onload = function() {
var firstLink =
$('#search')
.find('.rc').first()
.find('a').first()
.attr('href');
window.location.replace(firstLink);
///}
@stcruy
Copy link
Author

stcruy commented Oct 4, 2016

Tested with Firefox 49.0.1.

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