<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="referrer" content="no-referrer">
        <link rel="icon" href="/avatar.svg" type="image/svg+xml;charset=UTF-8">
        <link rel="stylesheet" href="/style/index.css" type="text/css;charset=UTF-8">
        <title>nwex.de/ramblings/webfinger</title>
    </head>
    <body>
        <h1>WebFinger</h1>

        <main>
            <a href="https://webfinger.net/">WebFinger</a> is a really cool internet protocol that allows retrieving of user information. You might
            know it from using Mastodon as it's used for looking up users there.
        </main>
        <section>
            <h3>Fun with Mastodon handles</h3>

            <p>
                As mentioned above Mastodon uses WebFinger to resolve users. This can be used as a simple redirection mechanism, described
                more in depth (and for interested readers who want to set this up themselves) on
                <a href="https://blog.maartenballiauw.be/post/2022/11/05/mastodon-own-donain-without-hosting-server.html">Maarten Balliauw's blog</a>.
            </p>

            <p>
                Below is a list of Mastodon handles you can use as aliases for my main account
                <a href="https://chaos.social/@networkException">@networkexception@chaos.social</a>:
            </p>

            <ul>
                <li><a href="https://nwex.de/.well-known/webfinger">@me@nwex.de</a></li>
                <li><a href="https://nwex.dev/.well-known/webfinger">@me@nwex.dev</a></li>
                <li><a href="https://networkexception.envs.net/.well-known/webfinger">@me@networkexception.envs.net</a></li>
            </ul>
        </section>

        <script type="module">
            import { tokenize, normalizeNewlines, highlight } from '/script/html.js';
            import { render } from '/script/view.js';
            import { Inspector } from '/script/html/inspector.js';

            const response = await fetch(window.location.href);
            const text = await response.text();

            window.tokens = tokenize(normalizeNewlines(text));
            window.spans = highlight(tokens);

            const inspector = new Inspector();

            render(text, spans, inspector);
        </script>
    </body>
</html>