Thanks! I took your changes and ran with them—new code here: https://gist.github.com/codesections/9959d4ddaf23be19078802754482874d.
Why is this step necessary? fosstodon.org might not be the server where you are registered, so we need to redirect you to your home server first.
Don't have an account? You can sign up here