I decided to make a separate thread for this. http://jsfiddle.net/okf06y8g/13/ I finally produce a simple webpage anyone can use to create interlinear texts. This works in chrome. 1) paste your text in the textarea in the right panel 2) click the button 3) in the new window, right-click in the page, and click "Translate to english" in the popup menu. That's it. Basically chrome does all the work, my script just prepare the html for the ruby elements. I haven't used it really yet, if you find problems, tell me.