UX Suggestion - Instance Community Search / Subscribe

https://lemmy.world/post/92981

UX Suggestion - Instance Community Search / Subscribe - Lemmy.world

It would be real sweet if you could paste in an instance into the community search, and see what communities they have set up and join straight from the https://lemmy.world/communities [https://lemmy.world/communities] UI. I just found out about https://feddit.uk/ [https://feddit.uk/] earlier, and being a Brit wanted to join a bunch of the communities and had to use their feddit.uk [http://feddit.uk] community browser and then paste the link in one by one into lemmy.world search, and the open up the community in lemmy.world and then press subscribe. Or even being able to subscribe an instance could be decent, but no doubt a lot more work and resource usage constantly federating new communities across etc.

I also found this that someone is devving for kbin that was based on mastodon code previously, seems it could be suitable for lemmy, or with some small changes. https://github.com/driccio98/kbin-link

Okay so I just forked one to make it suitable for lemmy, I've submitted it to firefox to be included in their extension store but in the meantime here's the repo if anyone is interested. Once it's uploaded onto the store I'll put a note out in this post and also probably make a new post to give people a heads up :)

https://github.com/FackJox/lemmy-link

There's a browser extension to make cross-instance user following simpler on Mastodon (Graze); that means you can just click to follow a user from your home instance, on any Mastodon instance. I think the same concept could be modified to apply to subscribing to Lemmy communities between instances.
Great shout! I also found this userscript although it is a little ugly atm (no hate to the dev!) and just redirects the whole page to your defined instance so you won't be able see the other community browser ui and subscribe as you described. https://sh.itjust.works/comment/60204
I found that extension you mentioned and unfortunately can't find a repo for it to start having a little look myself. I've messaged the dev on it to see if he's interested in lemmy or open sourcing etc.

Yeah I made an account on feddit.uk too, but I made this one first and it's taking a long time to build up subscriptions at the moment. Once it becomes easier to find and subscribe to communities I'll start building up my feddit.uk one too.

I use the jerboa app as I'm a phone user, and overall it's really good except for the community visibility and some other small issues. I'm constantly switching between the app and my browser to go through that process if I only see a link to a new community rather than a post I can just click through on. I'm sure in time these things will be addressed tho

Sounds like a good excuse to learn how to program.

Here is a little javascript that helps with adding remote subs to yours. It has it quirks, (namely always have to refresh the community page once before the button shows up) but it stops you from having to manually type a community into your instance.

It's basic but it has allowed me to add a communities a bit easier. I would like to expand on it.

Updated: "Easier Subscribe" script for remote instance communities. - The Simple Corner

Hey all, Here is a amateur script that will add a “easy subscribe” button to the community subscription box that will automatically link you back to you home instance’s search page, ready to click into the sub from your instance and subscribe. It should make your adding remote communities “slightly” easier than the manual method. You will need a Javascript Injector addon for your browser. I am using “JS Injector” for firefox. Make sure to get an addon that supports allowing the script to run on all sites. This will only add the button on the communities main page (/c/ in the url). Make sure to change the homeInstance var to your home lemmy instance where your account is. Feel free to use, copy and make it better (and less amateur!). You will have to refresh the community page once before the button appears. Something to do with the javascript injector addons not being able to run when lemmy’s “client.js” script runs forever (live updater script I beleive). However, once your on a /c/ and refresh once that script doesn’t run. UPDATE: FIXED! Remote Community: [https://thesimplecorner.org/pictrs/image/f5b19bec-4400-46ef-b654-cb7efd1eb950.jpeg] Enjoy, I hope it is of use. Remember never run a script that you don’t understand. // Easier Subscribe Script /* EDIT YOUR HOME INSTANCE */ var homeInstance = "https://thesimplecorner.org"; /* ---------------------- */ /* Script */ var url = window.location.href; var currentPage = url; var broken = url.split('/c/'); var site = broken[0]; site = site.replace('https://', ''); var community = broken[1]; var subString = homeInstance + "/search/q/!" + community + "@" + site + "/type/All/sort/TopAll/listing_type/All/community_id/0/creator_id/0/page/1"; function update(comm, page) { var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { console.log("updating html xhr"); document.querySelectorAll('[role="alert"]').forEach(function(el) { el.innerHTML += "<br /><br /><a href=" + subString + " target='_blank'><button>Easy Subscribe</button></a>"; }); } } xhttp.open("GET", this, true); xhttp.send(page); } //Browsing remote instance setInterval(function() { url = window.location.href; if (currentPage != location.href) { broken = url.split('/c/'); site = broken[0]; site = site.replace('https://', ''); community = broken[1]; subString = homeInstance + "/search/q/!" + community + "@" + site + "/type/All/sort/TopAll/listing_type/All/community_id/0/creator_id/0/page/1"; // page has changed, set new page as 'current' console.log("Easy Sub Running..."); if (document.querySelector('meta[name="Description"]').content.includes("Lemmy")) { console.log("On lemmy"); if ((url.includes(homeInstance) == false) && (url.includes("/c/"))) { console.log("On remote instance community"); update(community, url); } } currentPage = location.href; } }, 500); // Direct to community if (document.querySelector('meta[name="Description"]').content.includes("Lemmy")) { console.log("On lemmy"); if ((url.includes(homeInstance) == false) && (url.includes("/c/"))) { console.log("On remote instance community"); update(community, url); } } Working on a new feature… A better subscription bar for browsing your subscriptions (and eventually remote). Will be out soonish. [https://thesimplecorner.org/pictrs/image/6c0213b0-953f-4dbf-bf7c-08af1e24eda2.png]