Děkuju, že jste na mě počkali, vykopávám ;)
// ==UserScript==
// @name cancel_X
// @namespace
http://tampermonkey.net/
// @version 0.1
// @description Automatically redirect x.com URLs to xcancel.com
// @author You
// @match
https://x.com/*
// @match
https://www.x.com/*
// @run-at document-start
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Get current URL and replace x.com with xcancel.com
const currentUrl = window.location.href;
const newUrl = currentUrl.replace(/^https?:\/\/(www\.)?x\.com/, 'https://xcancel.com');
// Only redirect if URL actually changed
if (newUrl !== currentUrl) {
window.location.replace(newUrl);
}
})();