I want to redirect a URL to a different URL. For example, if I were to type in:
google.com
and hit enter, it should redirect me to:
yahoo.com
I was at a previous thread and found a code for this, but unfortunately, it works on ALL URLs, which I don't want. Also, once the redirect is complete (at yahoo.com) the page will reload again, endlessly looping.
EDIT: Current Code:
// ==UserScript==
// @name Google to Yahoo
// @description Redirects Google to Yahoo
// @include http://*.google.*/*
// @version 1
// ==/UserScript==
if(content.document.location == "http://google.com"){
window.location.replace("http://yahoo.com")
}