jaidedctrl / Nitter Redirect

// ==UserScript==
// @name         Nitter Redirect
// @description  Redirect Twitter to Nitter
// @author       jaidedctrl
// @license      GPL-3.0-or-later; http://www.gnu.org/licenses/gpl-3.0.txt
// @match        *://*twitter.com/*
// @run-at       document-start
// ==/UserScript==
 
var nitterInstance = "nitter.net";
 
var url = window.location.href;
if ( url.match("twitter.com") != null ) {
        url = url.replace( /.*twitter.com/, nitterInstance );
    	window.location.replace( url );
}