not sure why this mod is not showing up even after having tamper money and open framework, any idea why? tried to activate only this and open framework on the dashboard but the example sentences still is not there.
Because with the way that you have it, the item could have one or two context sentences available but none ends up being shown because the nonexistent third ends up getting picked by random and then it tries to access that element outside of the array.
Alternatively, to keep the upper limit to 3 (i.e., to keep the functionality the same as what it appears you desire), put a Math.min(3,context_sentences.length) in there as well.
this uses automated voice synthesis. I’ve been using it heavily during lessons, it allows me to read along with the voice ; it makes reading context sentences faster, and helps print the pronunciation and pitch accent in my memory.
For now, as an equivalent function, I’m using the “google translate” chrome extension ; when I select any text, it opens a little google translate box, which has a text to speech option.
But this process is slower than just clicking on a “audio” button like with the “advanced context sentence 2” script.
I don’t know how to code, or I’d do it myself. It might be possible to use relevantlines from “advanced context sentence 2” and insert them in this script?
Also this script is super useful but I had trouble initially finding it, because it’s not in the main list of API and 3rd party apps. Lots of people would benefit from finding it there!
I don’t know if this script is still being maintained, or if there is already another script that does this, but I edited the code a little bit to show the translation of the sentence when hovering with the mouse. Also, instead of always showing the first sentence, it shows one at random from the ones available for that subject.
Yeah, I’m the original author, but WK likes to update their website, and that breaks scripts. I can’t really complain too much as nothing is guaranteed when you are essentially trying to rewrite their web pages. Maybe I’ll be inclined sometime in the future to figure out what they changed, and hence why it broke, but until then, it was good while it lasted.