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/config | 12 +++++++++--- vimb/scripts.js | 8 ++++++++ 2 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 vimb/scripts.js (limited to 'vimb') diff --git a/vimb/config b/vimb/config index c44cae1..4e23902 100644 --- a/vimb/config +++ b/vimb/config @@ -5,10 +5,16 @@ set incsearch=true set spell-checking=true set scripts=false -set font-size=12 -set monospace-font-size=12 +set font-size=14 +set monospace-font-size=14 set input-autohide=true nmap + zI nmap - zO -nmap = zz \ No newline at end of file +nmap = zz + +nnoremap :sh! mpv $VIMB_URI + +shortcut-add d=https://html.duckduckgo.com/html?q=$0 +shortcut-add g=https://google.com/search?q=$0 +shortcut-default d 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