Duplicated instance domain while redirecting
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
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.