[Userscript]: Anime Context Sentences

I think it’s fine to return results with とりあい for 取り合い, とにかく for 兎に角, or はずかしめ and 恥ずかしめ for 辱め. I know some might want the exact search result returned, but that is a compromise I think that is better for learning purposes.

I’m not responsible for the userscript. For the game gengo textbook, in the “extra examples” section, some items use regular search, some exact search, and some are hand-picked from the database. That is a better approach.

Edit: I archived the old repo and added the link to the latest one.

1 Like

Relased v1.1.1

  • Supports the new titles on immersionkit
  • Updated to v1.4 of item injector

Thank you @Sinyaven and @mathewthe2 for answering the questions in the thread, and for the updates and new titles. You’re awesome!

P.S. @mathewthe2 I won’t implement the sentence length form the API since the user can sort by length, or scroll past the short ones. :slight_smile:

8 Likes

sorry if this has been answered before, i’ve done a quick scan and can’t find it

sometimes when new titles get added, all of the other titles which i’d selected in that list get deselected? even though i’d not done anything or even gone into the settings at all. so this time, in the ghibli list everything was fine. the other titles were selected as i’d left them, and the new ones were where they should be. in the (tv) anime list, the new ones had come in, but all of the other ones had been deselected. last time i remember the same thing happening to both lists, not just the one like this time

is this a common thing or is it just me :sweat_smile: again, sorry if this has been brought up before

Hello :slight_smile: Good question! I’ll be honest, I don’t know how to preserve settings between updates, and I justified it by saying at least if the title choices are lost, this will prompt people to open settings and see the new titles! Not very user friendly, I know. :sweat_smile: I’ll do more tests before the next update to see if I can avoid it.

2 Likes

no problem, thanks!

I just came to the forum after thinking that Wanikani context sentences are a bit bland and poorly implemented and stumbled upon this amazing script! Thank you so much for creating this, it really breathes new life into my lessons! And of course also a big thank you to the creators and contributors of immersionkit.com, which I wouldn’t have discovered otherwise.

3 Likes

hi. thank you for the script. i really wanna use this but I don’t know how to navigate to the settings panel where you select anime from. and this settings icon is not clickable

image

Do you have Open Framework installed? It is necessary for displaying the settings dialog.

1 Like

that was the problem. thank you so much^^

1 Like

Is it possible to autoplay the first context sentence’s audio (unless specifically chosen, or opt out), after the voice actor has finished speaking the vocabulary?

2 Likes

Yep i’d love that too, or even have the audio options to automatically open after answering

Hey, this is awesome! I have a few critical suggestions , ranked by order of importance :

  1. Anime chosen for filter - their sentences will be at top, but the rest will be displayed lower. this way I can avoid having no example sentences at all because I’ve filtered too much. usually I just want the animes that I like be on top, but having something is better than nothing in cases where my specific anime does not have that vocab word :slight_smile:

  2. option for anime example sentences to be on top when opening info on card . i.e i got a card wrong and press F to see details - anime context will be at the top.

  3. option for card info to open automaticlly because I want to hear the recordings when I review .

  4. option to give a “like” to a specific recording you like so it will play back during reviews or atlist be on top of other anime sentences when you open the additional info.

  5. have an option to remove anime sentences with one word, or with the word put in brackets - often times subtitles have certain words in brackets, and these words are not actually part of the sentence but actually describe the scene . i.e words in brackets are not actually voiced.

  6. have an option to mark an anime sentence , then export the list of anime sentences marked into downloadable audio files so I can make anki cards out of them :smiley: .

6 Likes

Can I make a donation? I love this

wish there was a plugin the automaticly plays a sentence after entering an answer

Seems there’s a new Wanikani update today which separates the lesson quiz info into tabs:


As you can see, Anime Sentences is in its own unnamed tab rather than the Context tab. Just a heads up as I would think it would make sense for it to join the Context tab.

4 Likes

After updating Item Info Injector last week, I was wondering how long it will take until someone mentions the change in one of the dependent scripts. :smiley:

I have already created a pull request for fixing the problem with the unnamed tab (but this fix still keeps the Anime Sentences section as a separate tab). @psdcon, if you want to place the Anime Sentences section in the Context tab, the append() has to be changed into appendSubsection(). You now also have the option to change notify() [1] into notifyWhenVisible() [2] – both of them work, but have small differences (currently only during the lesson quiz).


  1. The callback function will be called once the user opens the item info. At this point, the Context tab is still closed and its content is not in the DOM, so when you try to append your section, Item Info Injector outputs a warning in the console that your section could not be injected. However, your section is cached and appended automatically once the user opens the Context tab, so everything should still work. ↩︎

  2. The callback function will be called once the user expands the Context tab. In this case, appendSubsection() works without problem and you don’t get a warning. However, if the user collapses and then expands the Context tab once more, the callback function is also called again – so your section gets recomputed every time the tab is expanded.

    So in the case of Anime Sentences, the main difference between these two options is: with notify(), Anime Sentences gets loaded even if the user opens the item info without ever looking into the Context tab, while notifyWhenVisible() will delay the loading until the user actually opens the Context tab, but this also means that the user then has to wait until the data has been fetched from Immersion Kit before they can see the sentences. ↩︎

1 Like

Sentences not showing for any item.
Simply saying “No sentences found.”
Wondering if Immersion Kit was down, or…?
It was working before, so I don’t believe it on my end.

Also, I use an extension called Dark Reader that gives “night mode” to every website. This causes ‘greyed out’ items to become visible. (I’d post a pic, but can’t due to there being no sentences lol)
I guess this would be more of a suggestion - Perhaps a way of implementing the ‘greying out’ that’s unaffected by changing background colors. I know of other ‘dark mode’ scrips, and wonder how they affect the greying out.
‘Night mode’ absolutely saves my eyes.

Love this scrip btw.

2 Likes

I rebooted the server and it’s up now.

The logs were gone by the time it was down. I’m guessing it might have to do with too many concurrent reads at the same time…

5 Likes

Same problem for me today, But I don’t if is just me

helloooo, i absolutely love this script so thank you !! but suddenly some of it stopped working for me. the sentences are still there but the audio and image are now missing? ><

Just a question - which country do you live in?

There seems to be DNS issues with the block storage in certain areas.