Add xcancel-culture.js

This commit is contained in:
Jason Cosper 2024-10-19 09:23:13 -07:00 committed by GitHub
parent 8d2890fc5a
commit d6dc809c48
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

16
xcancel-culture.js Normal file
View File

@ -0,0 +1,16 @@
// ==UserScript==
// @name Xcancel Culture
// @namespace https://github.com/boogah/userscripts
// @version 2024.10.19
// @description Automatically redirects x.com to xcancel.com.
// @author boogah
// @include https://*.x.com/*
// @license GPL-2.0
// @grant none
// ==/UserScript==
window.addEventListener('load', function() {
// Redirect to xcancel.com with the current path and query params
var xcancelURL = window.location.href.replace(/https:\/\/([^.]+\.)?x\.com/, 'https://xcancel.com');
window.location.href = xcancelURL;
}, false);