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
  • Save tanepiper/aab8870fe4e8f1564a6c92f302dd706c to your computer and use it in GitHub Desktop.
Save tanepiper/aab8870fe4e8f1564a6c92f302dd706c to your computer and use it in GitHub Desktop.

Revisions

  1. tanepiper revised this gist Nov 21, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion bookmarklet.js
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    javascript:(function(){
    const MY_MASTO_HOST = 'front-end.social';
    const MY_MASTO_HOST = 'tane.codes';

    if (window.location.host === MY_MASTO_HOST) return;

  2. @bramus bramus created this gist Nov 21, 2022.
    10 changes: 10 additions & 0 deletions bookmarklet.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    javascript:(function(){
    const MY_MASTO_HOST = 'front-end.social';

    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}`;
    })();