- Copy the code below:
javascript:var name=document.querySelector(".account__header__tabs__name").firstChild.firstChild.innerText; var mastodonAccount=document.querySelector(".account__header__tabs__name").firstChild.children[1].innerText; var mastodonURL=mastodonAccount.split('@'); navigator.clipboard.writeText(mastodonAccount+','+name+','+'https://'+mastodonURL[2]+'/@'+mastodonURL[1]);
- Create a new bookmark.
- Set the bookmarklet name and paste the above as the URL.
Nice, yes. There’s a but, though. Mastodon 4. switches where the profile picture leads. If I see it correctly, the url was generated via the link included in the profile picture. But with Mastodon 4 clicking the preview image will extend the image and not lead to the profile on the home sever. I tested it with social.tchncs.de (which is on M4) and fediscience.org (which is on M3). Did work with fediscience smoothly, but in social.tchncs it returns the profile picture url.