Twitter/X Redirect

Userscript that redirects Twitter/X to Nitter

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name        Twitter/X Redirect
// @namespace   Twitter/X Redirect
// @include     *://x.com/*
// @include     *://www.x.com/*
// @icon        https://nitter.net/logo.png
// @grant       none
// @version     1
// @author      LiamGo
// @description Userscript that redirects Twitter/X to Nitter
// @run-at document-start
// ==/UserScript==

// Enable/disable sites redirecting
var redirect_twitter = true;

// Change instances
var nitter_instance = "https://farside.link/nitter";

var site = window.location.hostname
var path = window.location.pathname

if (redirect_twitter && (site == "x.com" || site == "www.x.com")) {
  window.location.replace(nitter_instance + path)
}