From d6dc809c4820f8cfa380b285ed044a96e91655db Mon Sep 17 00:00:00 2001 From: Jason Cosper Date: Sat, 19 Oct 2024 09:23:13 -0700 Subject: [PATCH] Add `xcancel-culture.js` --- xcancel-culture.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 xcancel-culture.js diff --git a/xcancel-culture.js b/xcancel-culture.js new file mode 100644 index 0000000..563b027 --- /dev/null +++ b/xcancel-culture.js @@ -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);