summaryrefslogtreecommitdiff
path: root/vimb/scripts.js
diff options
context:
space:
mode:
authorTCCQ <thomasmulmer02@gmail.com>2025-04-09 19:17:51 -0700
committerTCCQ <thomasmulmer02@gmail.com>2025-04-09 19:17:51 -0700
commit729e4d189c2d25a551a77a77276c75f42fbc4faa (patch)
tree95dff04e16c983e09fd4735fd3e5b6d59e6e9f7a /vimb/scripts.js
parentddb6e57e50eb4c83050695d98c05aeb21df5fc1f (diff)
vimb, oldreddit and bindings
Diffstat (limited to 'vimb/scripts.js')
-rw-r--r--vimb/scripts.js8
1 files changed, 8 insertions, 0 deletions
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);
+ }
+})();