[Userscript] Forum: IME2Furigana

Version 1.10:

Updated to work again after recent Discourse changes

I did not find a way to inject IME2Furigana’s cook function into Discourse’s own call to its cook function anymore. As a workaround, I replaced the textarea’s value property with a custom getter and setter. This approach is probably not yet compatible if used in multiple scripts (e.g. @Kumirei’s Emoter script), but I wanted to push out the update to get feedback before thinking about compatibility.

EDIT: I just realized that this workaround breaks Discourse’s formatting features (e.g. selecting a word and pressing Ctrl+B will fail if there is furigana markup anywhere before that). I hope I will find a way to fix this tomorrow. Ideally, there would be a way to determine whether the textarea.value getter was called from Discourse’s cook function or from somewhere else :thinking:

3 Likes