(All the above posts prior this post creation don't work anymore?)
Solution
I think there are two straightforward ways to implement this:
- Skip redirect note (which you get today)
- Simulate an user
I made a script for 1, but noticed that "https://google.com/search?btnI=&q=%s" sometimes even doesn't show a redirect note if you use space, e.g. https://google.com/search?btnI=&q=yeah%20super.
But simulating the user works flawlessly as to be expected. I used the code of "arboreal shark" as a basis for beginning making this (so also props to him).
// @name Google IFL by UserSim
// @match https://*.google.com/*?lucky=*
// @match http://*.google.com/*?lucky=*
// @match https://google.com/*?lucky=*
// @match http://google.com/*?lucky=*
// @match https://*.google.de/*?lucky=*
// @match http://*.google.de/*?lucky=*
// @match https://google.de/*?lucky=*
// @match http://google.de/*?lucky=*
// ==/UserScript==
// Idea: Simulate normal user -> Google cannot block that without other effects
// Searches e.g. by "www.google.com/?lucky=searchterm_goes_here" or "www.google.de/?lucky=searchterm_goes_here"
// console.log("Hello, World!"); // Test if script is activated on site:
// # Show blank screen while working
document.getElementsByTagName("body")[0].style.display = "none";
// # Decode search input
var pathname = document.URL;
var start = pathname.indexOf("?lucky=");
var searchterm = pathname.substring(start+7);
var decodedSearchTerm = decodeURI(searchterm); //otherwise you will have `%20` for space and so on
// # Input this in search field
document.getElementsByName("q")[0].focus();
document.getElementsByName("q")[0].value = decodedSearchTerm;
// # click Feeling Lucky Button
var btnLucky = document.getElementsByName('btnI')[0];
btnLucky.click();
Browser Integration
You can use the code e.g. in firefox with greasemonkey (i would recommend greasemonkey and no other user script manager, because others are not open sourced on e.g. github or seem to have privacy problems). Then you can make a new bookmark for
http://www.google.de/?lucky=%s
and add "i" as a word (for "instant") and now search by i <searchterms>
in addressbar. Nice!
Speed
Also to mention: my script for 1. (even though doesn't work for spaced inputs, see above) wasn't significantly faster than my 2. solution. So I stopped looking if another url option doesn't have the problem with space.
But faster is always better for this things. If somebody has a significantly faster version, please post :)
google.com/search?q=new%20york%20dijon&btnI=Im+Feeling+Lucky
,google.com/search?btnI=1&q=new%20york%20dijon
,google.com/search?btnI=I%27m+Feeling+Lucky&ie=UTF-8&oe=UTF-8&q=new%20york%20dijon
btnI
works with up to 2 keywords AND if Google does not decide you might have typed something wrong (likeDid you mean: geeks alive
). Otherwise a bit of javascript is used to redirect you.jsaction="sf.lck"
.