[Userscript] 100% Review Fanfare 2: Electric Boogaloo

This is a continuation of a userscript of the same name by @evolutionxbox, who appears to have gone inactive.

To recap what the original version did:
Upon achieving a 100% accuracy in your reviews, you will be given the opportunity of experiencing dopamine by having WaniKani play some sound on the review summary page!

My edition incorporates the following changes/fixes:

  • Autoplay now works again, at least in Chrome (tested with v101).
  • The fanfare will play only once.
    • Previously it played each time you opened the review page, provided you got an accuracy of 100%.
    • Can be toggled if you wish.
  • Play confetti in addition to the fanfare!
  • Change the fanfare to something of your choice!
    • Accepts either base64 encoded data or an URL to a valid MP3 file.
      • Local file URLs might work, provided you give local file access to your user script Add-in.
      • Be aware that this can pose a security risk that malicious scripts could exploit.
  • Userscript menu for easily managing all of the above.

Download

Greasemonkey URL https://greasyfork.org/en/scripts/446584-wanikani-100-review-fanfare

Install the script with an user script Add-On of your choice, such as TamperMonkey.
Consult this guide if you are unsure.

Changing the sound

By default, the BotW item fanfare will play.
To change the sound, it’s recommended to encode a sound file as b64:

  • Go to this website.
  • Set Output Format to Data URI.
  • Upload your file, press Encode.
  • Copy all of the content in the Base64 text field.
  • Open the script menu (click on your Userscript Add-in in the browser menu), selecting Set jingle.
  • Paste the contents you copied previously into the text field:

You can test your fanfare by selecting Preview jingle in the menu.
If the sound fails to play, then your browser either blocks autoplay or your data source is invalid.
(Bad encoding, bad file URL etc.)

Bugs and Feedback

Please report bugs directly in this thread.

Notes

This has been a side-project of mine during my military service, where sitting around doing nothing is the norm.
(At least in switzerland :P)
The script works, although I guess the UI/UX could be improved.

If I find the time, I’ll consider adding a much nicer menu that can be natively access in WaniKani through the Scripts submenu - as most other scripts do as well.

10 Likes

Great thread title. :laughing:

One thought for v3:

I’ve never achieved 100% for any session with a significant number of reviews (more than ten or twenty), but I often play a game with myself to see how long I can continue a 100% streak during a session.

Since I almost never perform more than one session per day, I rarely have under 100 reviews in a session. If this script only operates on the summary screen, it would be less interesting to me than one that tracks 100% streaks during, and plays on a newly presented review page whenever the prior record is surpassed.

4 Likes

You are correct, this script does only operate on the summary screen - as it did in the original.
Indeed, for users like you with a great workload, you’ll probably very rarely see the script actually in action.

Your suggestion is certainly interesting and I’ll see if I can implement something like it.

3 Likes

Off-topic: If someone could add my script to the big list of Add-Ins, that’d be greatly appreciated.

With my current forum permissions, I can only mention up to 10 people in one post thus prohibiting me from editing the list :stuck_out_tongue:

I think this limit applies to everyone, therefore only the 10 authors with the most listed scripts are tagged while the other ones are links to their profile pages. When you edit the wiki post and look near the top of the post, you can see the “ranking” of contributors which determines who gets tagged.

2 Likes

Thanks for the info, I was able to successfully edit it by creating a link instead.

1 Like