Mastodon Redirector – A browser extension to rewrite external Mastodon URLs to your own instance
This demo shows Chromewith the extension running. My Mastodon host is front-end.social . After configuring the extension, I can quickly jump from other Mastodon instances to the instance that hosts my account. From there, I can follow/favorite/boost the profile/post I was visiting before.
For example, Zach Leatherman [email protected] . The extension takes care of this for me by injecting a link in the modal that is shown.’s profile is reachable at https://fediverse.zachleat.com/@zachleat . Because I have an account on the front-end.social instance, the URL that I can use to interact with him is https://front-end.social/@
Alternatively I can press the extension button itself – or use the SHIFT + ALT/OPT + M shortcut – to get redirected.
# Get the extension
The extension is available on the Chrome Web Storeand Mozilla Add-Ons Website . If you can’t or don’t want to run this as an extension, you can also use the bookmarklets.
The source code of the extension is available on GitHub. If you like the extension, please leave a review on the relevant extension store. Bugscan be filed in the repo.
When I joined Mastodonback in November 2023 , this almost immediately was one of the things that nagged me: whenever I visited someone’s profile or a link to a post on a different instance I could not follow them nor favorite/boost their posts. Instead, I needed to go to my instance, look up their name, and then find back the post that way.
(It was only later that I discovered that you can search for a remote URL on your local instance and it’ll redirect to the local version when doing so)
To not have to rewrite these URLs manually, I rather quickly created a bookmarklet to rewrite profile URLs. As an experiment a few days later– to get myself acquainted with Extensions Manifest v3 – I turned that into a browser extension for use with Google Chrome (+ other Chromium derivatives) and Mozilla Firefox .
The extension was released under the name “ Mastodon Profile Redirector”, as that what the extension only did back then: upon pressing the extension button, it would redirect you to the profile page served by your instance.
Later on in December 2022, I added a Content Script to the extension which monitors follow dialogs on Mastodon pages. Whenever such a dialog got shown, the extension injects a button that directly links to the profile on your own instance. This feature got released in version 0.3.0 .
Zach’s profile on his origin URL, after having pressed the “Follow” button. The extension has automatically injected a link to his profile on my front-end.social instance.
A feature that was long missing was the ability to rewrite individual posts. Even though I knew how to build it, I never got round to implementing this. Last week, I finally made some time to do so and released version 0.4.0 which includes this feature. Also new is a shortcut to invoke the redirection. Hit SHIFT + ALT/OPT + M on a Mastodon profile page or Mastodon post detail page, and you’ll be redirected. Because of this expanded scope of the extension, it also got renamed to “ Mastodon Redirector ”.
# Spread the word
To help spread the contents of this post, feel free to retweet its announcement tweet post / toot post :
I made something to make my browsing experience on That Other Social Networkmuch better. Maybe it’ll be of good use for you as well. Available on the Chrome Web Store and the Firefox AMO website. In non-supported browsers you can use the provided bookmarklets. Source on GitHub. https://t.co/7Yv5RDpun0 — Bramus ( @bramus ) September 11 , 2023