Skip to content

Instantly share code, notes, and snippets.

@eudaldca
Last active November 18, 2022 14:43
Show Gist options
  • Save eudaldca/a62d790c79679d9f50ef1f1c6ae76034 to your computer and use it in GitHub Desktop.
Save eudaldca/a62d790c79679d9f50ef1f1c6ae76034 to your computer and use it in GitHub Desktop.

Instal·lació

  • Copieu el text i canvieu mastodont.cat per la vostra instància (important deixar la / del final)
  • Editeu un marcador existent i poseu el codi sencer a la URL
  • Si voleu, podeu canviar la barra de marcadors perquè sempre estigui visible fent click dret a la barra de marcadors i seleccionant 'mostrar'
javascript: (() => {
const base = 'https://mastodont.cat/';
const match = window.location.href.match('https?:\/\/(?<server>[a-zA-Z0-9-.]+)\/(?<name>@[a-zA-Z0-9-_]*)(?<remoteServer>@[a-zA-Z0-9-.]*)?');
if (match) window.location.href = base + match.groups.name + (match.groups.remoteServer ?? '@' + match.groups.server);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment