Phew, there are so many files and lines in that repo.
As far as I understand it, all that has to be done is something like:
document.body.innerHTML.replace(/<some_regex>/,'<some_string>')
Where <some_regex> matches strings of type @[email protected]
and '<some_string>' turns that into <a href=https://yourinstance/web/@[email protected]>@[email protected]</a>
https://github.com/rugk/mastodon-simplified-federation