From 729e4d189c2d25a551a77a77276c75f42fbc4faa Mon Sep 17 00:00:00 2001 From: TCCQ Date: Wed, 9 Apr 2025 19:17:51 -0700 Subject: vimb, oldreddit and bindings --- vimb/scripts.js | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 vimb/scripts.js (limited to 'vimb/scripts.js') diff --git a/vimb/scripts.js b/vimb/scripts.js new file mode 100644 index 0000000..b0698dc --- /dev/null +++ b/vimb/scripts.js @@ -0,0 +1,8 @@ +(function() { + const pattern = /https?:\/\/www.reddit.com/; // Change this to match the URL pattern you want + const currentUrl = window.location.href; + const redirectTo = currentUrl.replace("www", "old"); // Set the URL to redirect to + if (pattern.test(currentUrl)) { + window.location.replace(redirectTo); + } +})(); -- cgit v1.2.3