>>513695858
if you use this simple script, all xigger links will send you to the mirror of your choice, in this case its nitter
// ==UserScript==
// @name X.com Nitter.net Redirect
// @namespace
http://tampermonkey.net/
// @version 1.0
// @description Redirect and replace all x.com links with nitter.net links
// @author You
// @match *://*/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Function to rewrite a single URL
function rewriteUrl(url) {
return url.replace(/^https?:\/\/(?:www\.)?x\.com/, "
https://nitter.net");
}
// 1. Redirect if we are on x.com directly
if (/^https?:\/\/(?:www\.)?x\.com/.test(window.location.href)) {
window.location.replace(rewriteUrl(window.location.href));
}
// 2. Replace all links on the page
function replaceLinks() {
document.querySelectorAll('a[href*="x.com"]').forEach(a => {
a.href = rewriteUrl(a.href);
});
}
// Run on page load
replaceLinks();
// Also observe for dynamically loaded content (like infinite scroll)
const observer = new MutationObserver(replaceLinks);
observer.observe(document.body, { childList: true, subtree: true });
})();