[Userscript] Self-Study Quiz


#64

This works wonderfully. So here are your cookies:




The only things I can think of that you may want to consider adding is:

1— the ability to resize the quiz box (ie: enlarge the font and the box) I zoom in on firefox when on WaniKani, so not a big problem, but something to consider… if you want. :wink:

2— when get an answer correct the audio reading for the vocab is read outloud… ~frankiebluej


#65
frankiebluej said...2--- when get an answer correct the audio reading for the vocab is read outloud... ~frankiebluej
This is one I really want... but WK doesn't send the audio file link via the API :-(
I'd have to load 2 extra URLs for every item to find, extract, and play the audio, and the resulting lag would be extremely frustrating.

There are potential workarounds, but none of them very appealing so far.  I'm open to ideas, though.

[EDIT:  ooh.. I just thought of one.  Hmm...]

[EDIT2:  Oh, and thanks for the cookies!!]

#66

Is it possible to add a timer? :smiley: To race myself and increase accuracy.


#67

You spoke about making the quiz available for all the page (so the ten levels in the page) for kanji and radicals ; are you still considering it ? I think it will help me, but I don’t want you to lose time just for me !
This script made me come back to WaniKani after a medical leave (arg, never again an hospital without internet!) and it’s been very useful. Can’t thank you enough :wink:


#68
kurseddragon said...
Is it possible to add a timer? :D To race myself and increase accuracy.
Melode said...
You spoke about making the quiz available for all the page (so the ten levels in the page) for kanji and radicals ; are you still considering it ?
I'll add these to the list for consideration  ^_^

I've also got a pending change that adds audio playback, but I'm awaiting feedback from Viet about the method of fetching the audio links.

#69

v2.0.8 - Added audio support and listening quiz



If the “Listening Quiz” preset doesn’t automatically pop up, here are the settings to recreate it:



To replay audio, press Ctrl-A, or click on the big speaker icon.

In the settings area (upper-left of the quiz), the speaker toggles auto-playing of audio during normal non-listening quizes… i.e. when you are being asked to translate vocab (kanji) to reading or meaning.  It does not have any affect during listening-quiz questions, which will always play audio (otherwise, how would you know the question!?  :-)  )


#70

^^^  On the “listening quiz”, there are some spoken words that have multiple meanings (e.g. ひ can mean ‘sun’ or ‘fire’).  The script isn’t sophisticated enough to account for those, and I don’t intend to make it do so.  But there’s no actual penalty for wrong answers, so it’s not really an issue.  You can just click the ‘next’ button, or click ‘help’ to see which one it’s looking for and enter the answer it wants.


#71

Thank you! Thank you! Thank you! To rfindley and WaniKani for letting rfindley have the sound files. THANK YOU! I’m actually giddy… lol ~frankiebluej


#72
rfindley said...
aragonsr said...I did a little digging real quick.
If I turn off the "Helvetica Neue" font (or remove it) from the body tag, it centers it again.
The font on the black border changes though.
Thanks, that helps a lot!

Before I make any changes:
In Chrome's CSS editor (i.e. when you right-click an element and select "Inspect"), click on the "computed" tab of the CSS window, and scroll all the way to the bottom.  It should show you exactly which font your browser selected from the list.

Could you tell me which fonts your browser is using for each section of the quiz window?  On Windows, I'm seeing "Ariel" as the main English font, and "Meiryo" on the Japanese.  FontAwesome is always used for the icons, and I end up with "consolas" for the scoreboard section in the upper-right.

I expect several of those will be different on Mac.  What interests me most is what font you're ending up with when you disable the"Helvetica Neue".
There are three entries in there. Helvetica Neue, Helvetica, Arial, and sans-serif.
When I delete Helvetica Neue, the computed entry says Helvetica, Arial, sans-serif in that order. So it looks like it's Helvetica.
Thanks. 

#73
frankiebluej said... Thank you! Thank you! Thank you! To rfindley and WaniKani for letting rfindley have the sound files. THANK YOU! I'm actually giddy.... lol ~frankiebluej
 Lol... glad you like it :-)

As for WK/audio, I'm not doing anything with the audio files themselves.  I'm just fetching links to where they are located on Amazon.

#74
aragonsr said...
rfindley said...[...] I expect several of those will be different on Mac.  What interests me most is what font you're ending up with when you disable the"Helvetica Neue".
There are three entries in there. Helvetica Neue, Helvetica, Arial, and sans-serif.
When I delete Helvetica Neue, the computed entry says Helvetica, Arial, sans-serif in that order. So it looks like it's Helvetica.
Thanks. 
 It sounds like you're looking at the computed font-family tag, not the actual font used.  If you scroll all the way to the bottom of the computed tab, it should show only the actual font being used.  Or maybe it's different on Mac Chrome....

#75

Not sure if I’m the only one, but…

The audio bugs out for me, if not all items are of the level are in the quiz (so if one of the “remove” options is checked, and there are items that actually match that option)

For example when I try to review level 1 vocab and have “remove burned” checked, there is only one item left (大した) But the audio that plays is not たいした but に (二).  It doesn’t seem to have anything to do with there only being one item, because if I check “remove unburned” instead (all but one item in the quiz) the audio is also not matching properly… and it also happens on my current level when I have “remove locked” or “remove unlocked” checked. In general just everytime there are not all items in the quiz.


#76
sumsum said... Not sure if I'm the only one, but...

The audio bugs out for me, if not all items are of the level are in the quiz (so if one of the "remove" options is checked, and there are items that actually match that option)

For example when I try to review level 1 vocab and have "remove burned" checked, there is only one item left (大した) But the audio that plays is not たいした but に (二).  It doesn't seem to have anything to do with there only being one item, because if I check "remove unburned" instead (all but one item in the quiz) the audio is also not matching properly... and it also happens on my current level when I have "remove locked" or "remove unlocked" checked. In general just everytime there are not all items in the quiz.
 Which quiz questions is it doing this on?  e.g. audio->reading?  kanji->reading?

[EDIT: nevermind.. I see the issue.]

#77
rfindley said...
sumsum said... The audio bugs out for me, if not all items are of the level are in the quiz (so if one of the "remove" options is checked, and there are items that actually match that option)
 Which quiz questions is it doing this on?  e.g. audio->reading?  kanji->reading?
I just tried it again, seems to be on all of them, so audio->meaning, audio->reading, kanji->reading and english meaning->reading . (I think on the other options there's no audio anyway, right?)

edit: looking at your edit, it seems like I was too slow :O


#78

v2.0.11 - Fixed mismatched audio when some items are removed from quiz.

Yeah… it should play audio only when you answer a correct vocab reading, or when the question is audio.


#79

Hello,

It seems like the review window doesn’t open when I click on the ‘quiz’ button. All the other buttons appear to work so I don’t know where that could be coming from. I have faced the same issue with both Firefox and Chrome, with and without any adblocker.

I would appreciate your help.

Thanks


#80
Fearfold said...It seems like the review window doesn't open when I click on the 'quiz' button. All the other buttons appear to work so I don't know where that could be coming from. I have faced the same issue with both Firefox and Chrome, with and without any adblocker. 
Nothing opens at all?  Do you get the 'Loading' window?  Do you get any errors in the Javascript console?  (press F12, then select the Console tab)

#81

I don’t get the loading window. I get “wkselfstudy: Failed to get API key!” in the Javascript console.


#82
Fearfold said... I don't get the loading window. I get "wkselfstudy: Failed to get API key!" in the Javascript console.
 Have you generated an API key?  (If not, go to the Settings menu on WaniKani, and Generate New Key)

#83

It works. Thanks a lot.  :wink: