Hacker News new | ask | show | jobs
by lapcat 1253 days ago
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.

2 comments

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