this post was submitted on 11 Jun 2023
4 points (100.0% liked)

Lemmy.World Announcements

28916 readers
5 users here now

This Community is intended for posts about the Lemmy.world server by the admins.

Follow us for server news ๐Ÿ˜

Outages ๐Ÿ”ฅ

https://status.lemmy.world

For support with issues at Lemmy.world, go to the Lemmy.world Support community.

Support e-mail

Any support requests are best sent to info@lemmy.world e-mail.

Report contact

Donations ๐Ÿ’—

If you would like to make a donation to support the cost of running this platform, please do so at the following donation URLs.

If you can, please use / switch to Ko-Fi, it has the lowest fees for us

Ko-Fi (Donate)

Bunq (Donate)

Open Collective backers and sponsors

Patreon

Join the team

founded 1 year ago
MODERATORS
 

i find it annoying to have to manually change urls to subscribe to a community outside lemmy.world, so i wrote a bookmarklet to quickly switch to the lemmy.world instance

to use, just drag the following code to your bookmarks bar (name it whatever you like), then click it when you want to use it

javascript:(function() {const myInst="lemmy.world";let currUrl=window.location.toString().split("/");let currInst=currUrl[2];currUrl[2]=myInst;let newUrl=currUrl.join("/")+"@"+currInst;window.location=newUrl;})();

readable version:

javascript:(
	function() {
		// make sure to change this if using on a different instance
		const myInst="lemmy.world";
		let currUrl=window.location.toString().split("/");
		let currInst=currUrl[2];
		currUrl[2]=myInst;
		let newUrl=currUrl.join("/")+"@"+currInst;
		window.location=newUrl;
	})
()
you are viewing a single comment's thread
view the rest of the comments
[โ€“] Grenfur@lemmy.one 2 points 1 year ago (1 children)

Do you know if the process works differently in FireFox? (Note that technically I use Ghostery but it's based in Firefox). I copied the script to a new bookmark URL and changed lemmy.world to lemmy.one since thats the instance I'm registered on. However, when clicked nothing happens. Is there something I'm missing?

[โ€“] Zeus@lemmy.world 2 points 1 year ago (1 children)

i can tell you that i made and currently use it with firefox...

sanity check, when you select edit bookmark it should look like this

however, i don't know about ghostery (i didn't even know they made a browser). it's possible they block arbitrary js for security reasons? it would be a dumb choice in my opinion, but i guess it's protecting you from yourself?

however i can tell you a couple of things. this doesn't work with some communities (they just 404), but that happens if one puts the url in manually. i don't know when or why this happens, but it does seem to happen a lot with lemmy.one. i wonder if it's a l.1 federation issue

[โ€“] Grenfur@lemmy.one 2 points 1 year ago (2 children)

Interesting. ok I'll dig further into it being Ghostery related then.

For your sanity, yes, looks relatively the same on me end when I edit bookmark.

[โ€“] Zeus@lemmy.world 2 points 1 year ago (1 children)

weird. sorry i couldn't help further.. : (

[โ€“] Grenfur@lemmy.one 2 points 1 year ago

No worries at all. I actually found a post working on a FF extension that I think will work. https://beehaw.org/post/493791. Similar idea, but adds an icon to the left of links.

I appreciate you taking the time to look into it though!

[โ€“] Zeus@lemmy.world 1 points 1 year ago

weird - sorry i couldn't help.. : (