Hacker News new | ask | show | jobs
by josefresco 1248 days ago
Just wanted to share a tool (Chrome extension), that has made following people on Mastodon much easier.

Mastodon View Profile: https://chrome.google.com/webstore/detail/mastodon-profile-r...

Basically you click to view someone's profile, then click this extension's button in your toolbar and it will take you to YOUR instance, where you can follow that person with just one click (no copy+paste+search)

2 comments

From looking at the source on Github, it appears that this extension attempts to work with simple string rearrangement AFAICT. Unfortunately, this approach doesn't generalize, as I discovered myself while attempting to build a similar extension.

It will work in many cases, but it will also fail in other cases. It's not universal.

The only reliable method is to use the search field on your instance, or to directly query the Mastodon API.

This simple code works for me:

    let your_instance="masto.ai";

    document.location=(
        "https://"
        + your_instance
        + "/authorize_interaction?uri="
        + encodeURIComponent(document.location)
    )
Before you turn it into a bookmarklet, set your_instance to the Mastodon instance you use.

You can use my bookmarklet editor to turn it into a bookmarklet:

https://www.gibney.org/bookmarklet_editor

Your code works, but there's a slight delay in comparison to the extension. Thanks for sharing!
This seems to work, thanks!
Good feedback. I've used the button now around 60 times. The times when it "failed" were typically related to a temporary outage of the instance, or rate limiting. For example I used this thread to follow about a dozen new people, and eventually was blocked by "rate limiting".
The issue I'm talking about isn't about rate limiting, it's about user name and server name mapping.

Take one example below: https://fedi.simonwillison.net/@simon

This does not map to https://myserver/@simon@fedi.simonwillison.net but rather https://myserver/@simon@simonwillison.net

Not a Chrome user, but thanks for creating this. I generally find Mastodon's UX better than its reputation, but following from the web is terrible.
Just a clarification: I did not create this, just sharing it ;-)