mastodon-redirector icon indicating copy to clipboard operation
mastodon-redirector copied to clipboard

Duplicated instance domain while redirecting

Open alexbraga opened this issue 2 years ago • 1 comments

This behavior was observed while trying to redirect from @mastodon.social. For what I can tell, redirecting from other instances seem to be working fine (I haven't tried many, though), however redirecting from @mastodon.social ends up with the following URL pattern: https://myinstance.org/@[email protected]

I'm on Firefox 124.0.1 Arch Linux

alexbraga avatar Mar 28 '24 04:03 alexbraga

Ran into the same issue.

I changed both of those lines:

https://github.com/bramus/mastodon-redirector/blob/5ea830c1dc4876146fc1476ebdca1663f084f5ea/src/content.js#L16 https://github.com/bramus/mastodon-redirector/blob/5ea830c1dc4876146fc1476ebdca1663f084f5ea/src/background.js#L13

to

const userFromProfilePage = document.head.querySelector('meta[property="profile:username"]')?.content;

which seems to have worked. I'm not that familiar with all various versions and/or mods of mastodon, so I'll refrain from opening a PR, but maybe changing those two lines might work for some.

tadwohlrapp avatar Apr 16 '24 08:04 tadwohlrapp