Instant bookmark href url modifier?
I feel this will make stuff extremely easy for casual nitter users. [Unddit](https://www.unddit.com/) has recommended adding the following code to bookmarks bar which modifies reddit url to unddit when clicked. I feel this can greatly speeden up nitter usability for me personally. I have been unable to create my own since I am unable to find relevant documentation, yet I feel smart people from here could figure it out.

The code in question: 
`
javascript:window.open(location.href.replace(/:\/\/([\w-]+.)?(reddit\.com\/r|reveddit\.com\/v)\//i,%20%22://www.unddit.com/r/%22),%20%22_blank%22)`