Redirects Twitter URLs to Nitter URLs
当前为
// ==UserScript==
// @name Twitter To Nitter
// @namespace chillsmeit
// @version 1.0.0
// @description Redirects Twitter URLs to Nitter URLs
// @author chillsmeit
// @include *://twitter.com/*
// @run-at document-start
// @license GNU GPLv3
// ==/UserScript==
const NITTER_URL = 'https://nitter.net';
function redirectToNitter() {
let currentPath = window.location.pathname;
let currentSearch = window.location.search;
let currentHash = window.location.hash;
window.location.href = NITTER_URL + currentPath + currentSearch + currentHash;
}
redirectToNitter();