There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

Easy way to open a Lemmy link from another instance?

Is there an easy way to open a Lemmy link from another instance?

I have an account on one server, but often browser from 9 other servers. Sometimes, I find a community I would like to follow. Is there an easy way to open that community from a different instance/server? I find searching for that community on my main server works, but is clumsy.

cynber ,
@cynber@lemmy.ca avatar

We actually have an extension for this, it’s one of the more popular extensions for Lemmy&Kbin, going by the counts on chrome/firefox stores:

!instance_assistant

It was originally made to solve this problem, but we’ve been adding other features as well. Right now you can redirect communities and posts, and redirect links by right clicking on them.

Let me know if it works, and also where it doesn’t so that we can improve it :)

Andy ,
@Andy@programming.dev avatar

I’m using the Firefox addon Redirector, and one of my rules there redirects community links using regex. I keep adding to the pattern as I encounter more instances. Currently it’s:


<span style="color:#323232;">Pattern: https://(lemdro.id|lemmy.run|beehaw.org|lemmy.ml|sh.itjust.works|lemmy.fmhy.ml|lemmy.dbzer0.com|lemmy.world|sopuli.xyz|lemmy.kde.social|lemmygrad.ml|mander.xyz|lemmy.ca|zerobytes.monster)/c/(.*)
</span>

<span style="color:#323232;">Redirect to: https://programming.dev/c/$2@$1
</span>
BeanCounter ,

I have an account on one server, but often browser from 9 other servers.

Do you literally open 9 tabs for each instances? If that’s the case, that’s kinda weird. You don’t have to. That’s the whole point of Lemmy.

Link for a community in lemmy should be something like this: [Link Text](/c/[email protected]). If you click that in whatever instance you’re in, you should be able to access the community in that instance.

However, quite a lot of people just don’t care and copy/paste link for the community which is (understandable, but,) quite irritating. So after I read this post I just wrote this hacky Tampermonkey script to fix those links.


<span style="color:#323232;">// ==UserScript==
</span><span style="color:#323232;">// @name         Fix community link
</span><span style="color:#323232;">// @version      0.1
</span><span style="color:#323232;">// @match        https://[YOUR INSTANCE HERE]/post/*
</span><span style="color:#323232;">// @run-at       document-end
</span><span style="color:#323232;">// ==/UserScript==
</span><span style="color:#323232;">
</span><span style="color:#323232;">(function() {
</span><span style="color:#323232;">    'use strict';
</span><span style="color:#323232;">    const postLinks = document.getElementById("postContent").querySelectorAll("a:not(.community-link)");
</span><span style="color:#323232;">    const comments = document.getElementsByClassName("comment-content");
</span><span style="color:#323232;">
</span><span style="color:#323232;">    for (let aTag of postLinks) {
</span><span style="color:#323232;">        const isCommunityLink = aTag.pathname.startsWith("/c/");
</span><span style="color:#323232;">        aTag.href = isCommunityLink?aTag.pathname + "@" + aTag.host:aTag.href;
</span><span style="color:#323232;">    };
</span><span style="color:#323232;">    for (let comment of comments) {
</span><span style="color:#323232;">        let commentLinks = comment.querySelectorAll("a:not(.community-link)");
</span><span style="color:#323232;">        for (let aTag of commentLinks) {
</span><span style="color:#323232;">            const isCommunityLink = aTag.pathname.startsWith("/c/");
</span><span style="color:#323232;">            aTag.href = isCommunityLink?aTag.pathname + "@" + aTag.host:aTag.href;
</span><span style="color:#323232;">        };
</span><span style="color:#323232;">    };
</span><span style="color:#323232;">})();
</span>

It’s very far from being pretty (I especially hate how isCommunityLink works) so let me know if there’s a better way I can do this!

Krause ,
@Krause@lemmygrad.ml avatar
gusVLZ ,

I’ve made an Android app to keep multiple accounts in sync, you can check it at github.com/gusVLZ/lemmy_handshake

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines