Redirect faster with Greasemonkey
Posted
by
Chad
on Stack Overflow
See other posts from Stack Overflow
or by Chad
Published on 2010-12-22T06:30:58Z
Indexed on
2010/12/22
10:54 UTC
Read the original article
Hit count: 210
JavaScript
|greasemonkey
I'm using Greasemonkey to redirect certain URLs to another but I would like to redirect before the URL to be redirect loads.
Currently I'm using this simple script:
//==UserScript==
// @name Redirect Google
// @description Redirect Google to Yahoo!
// @include http://*.google.com/*
//==/UserScript==
window.location.replace("http://www.yahoo.com")
In the above, google appears for a second and then redirected to google. I want to go yahoo immediately. Is it possible, and how?
© Stack Overflow or respective owner