Hook up a user script to run after more details have been loaded

If you’re still interested, you could look at existing userscripts to see how they do it.

For example my Phonetic-Semantic Composition one, which does actually use waitForKeyElements().