This is based on GodofLaundryBaskets Google Docs Tone Mark Script. It will display the tone marks over the supported chinese names, and if the audio is available allow you to click on that name and listen to the audio guide for that name recorded by lunatique or nonplussed directly on the AO3 page.
As of November 6 '24, this script is currently affected by a bug in TamperMonkey; it will allegedly be fixed soon (version 5.3.6215), but the current non-beta version appears to still be 5.3.2. You can install Tampermonkey beta or use Violentmonkey to work around the issue. The various *monkey extensions work best when only one is enabled; you'll want to uninstall or temporarily disable whichever one you're not using.
There are two versions: One that also adds an on-page audio pronunciation guide and one that does just the pinyin replacement. For both you need to have tampermonkey/greasemonkey installed. Then you just need to click here for the pinyin replacement only to install/update it or click here for the pinyin replacement with audio guide version.
More are in progress.
Audio guide support is currently in progress. Not every word has audio at this point that can be linked.
If you would like to help with tone marks for fandoms that are not yet supported or could be improved, you can contribute tone marks to this google sheet. If you want to make changes to existing replacement rules, you can either change them in the spreadsheet and then mark the row red, or you can change it in the spreadsheet and submit a pull request where it is also changed in the corresponding fandoms file, noting what it is you changed.
If you spot an issue like missing or wrong tone marks, please let me know either by submitting an issue here or reaching out to me on twitter/tumblr @cathalinaheart or via email cathalinaheart {at} gmail.com.
You can add this css to an AO3 site skin to tweak the appearance of this script's replacements. None of these tweaks change the script's functionality, they only change its appearance.
.replacement {
text-decoration: underline;
}
.audio-guide {
display: none;
}
.tone-audio-button progress {
display: none;
}
For each line 'some text here|fancy replacement', the script replaces all instances of 'some text here' in the doc with 'fancy replacement'.