Skip to content

Instantly share code, notes, and snippets.

@tanepiper
Forked from bramus/bookmarklet.md
Last active November 21, 2022 16:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tanepiper/aab8870fe4e8f1564a6c92f302dd706c to your computer and use it in GitHub Desktop.
Save tanepiper/aab8870fe4e8f1564a6c92f302dd706c to your computer and use it in GitHub Desktop.
Mastodon User Page Bookmarklet
javascript:(function(){
const MY_MASTO_HOST = 'tane.codes';
if (window.location.host === MY_MASTO_HOST) return;
const user = document.querySelector('meta[property="profile:username"]')?.getAttribute('content');
if (!user) return;
window.location.href = `https://${MY_MASTO_HOST}/@${user}`;
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment