7

I'm sure many of us have had the problem of getting a link to a Lemmy/Kbin instance that isn't your own. But you want to subscribe to a magazine.

I created this JS bookmarklet (well no, GPT4 made it. But I helped xd)

If you are on the magazine's feed, click the JS bookmarklet and you'll be taken to your Lemmy/Kbin instance with that feeds url.

Step 1: create the JS bookmarklet by creating a new bookmark manually. You can name it whatever, but make sure that the url field is this entire section:

javascript:(function(){let prefix='https://kbin.social/m/';let url=window.location.href;let parts=url.split('/');let finalPart=parts[parts.length-1];let host=parts[2];let newURL=prefix+finalPart+'@'+host;window.open(newURL,'_blank');})();

(Github Gist)

Step 2: modify the 'prefix' to be whatever it is that your instance puts in front of a federated magazine.

With Kbin this is usually the url of your instance /m

With Lemmy it's the same but with /c

Step 3: Profit. Now you can visit a magazine from a different instance, click on the js bookmarklet and it should open a new tab where you can see the magazine in your own instance. And easily upvote/downvote or subscribe to it.

top 1 comments
sorted by: hot top controversial new old
[-] FoolishSamurai@kbin.social 3 points 1 year ago

Thanks! Didn't know you could do that with bookmarks

this post was submitted on 24 Jun 2023
7 points (100.0% liked)

Reddit Migration

207 readers
2 users here now

### About Community Tracking and helping #redditmigration to Kbin and the Fediverse. Say hello to the decentralized and open future. To see latest reeddit blackout info, see here: https://reddark.untone.uk/

founded 1 year ago