Something like this?
It’s a userscript called IME2Furigana that works pretty well. [Userscript] Forum: IME2Furigana