Mastodon is fully usable without any JavaScript at all; there are a number of 'client' applications that you can install entirely locally[1].
If you're using the 'normal' Web interface to Mastodon, you'll only ever need to run JavaScript from the server you registered for, even if you read posts from other servers.
OK, but there are many instances and you should be able to somehow make it automatically work with all of them when you access the URL (even in browsers that somehow do not render HTML).
You could use <link rel='alternate' type='application/activity+json'> but that only specifies that it is using Activty Stream and not that it is using Mastodon.
Absolutely - your browser should ideally handle it for you and offer to open any Mastodon link in the client of your choice. However, my comment was to indicate that this isn't an inherent issue with Mastodon or ActivityPub.
It's just a 'plumbing' issue, a matter of the rest of the Web ecosystem catching up with the rapid pace of the Fediverse's development.
What should be needing then is standardized commands to indicate which APIs it implements (which might be more than one) for any kind of web app services that may be available on multiple instances on multiple servers, that you can identify them and be able to work. Unfortunately, it seem that some do not do that (including Fossil; I tried to tell them to add such a thing but they don't want to do; I run my own Fossil and would want to expose some command to indicate its presence instead of being forced to use the built-in user interface).
Is this something we could do together? I'm a member of a few groups in the W3C, so I might be able to get something going there. My email address is in my HN profile if you like the the sound of that prospect :)
If you're using the 'normal' Web interface to Mastodon, you'll only ever need to run JavaScript from the server you registered for, even if you read posts from other servers.
[1]: https://joinmastodon.org/apps