[Userscript] Self-Study Quiz

So if I get one of the burned questions wrong, is it possible that it can be readded to my main reviews? Sorry if this question was already answered.

If you go to the bottom of that item’s page on Wanikani (e.g. via the search box on Wanikani), you can resurrect it, and it will return to Apprentice level. You can retire it back to Burned status at any time.

Self-Study Quiz doesn’t have a feature to do that for you.

2 Likes

life saver of an extension

I didn’t know that you could do that. But that will be really useful in the future.

The icons are dark and nearly illegible. They used to be white. This is likely a result of the recent icon changes in WK.

ssquiz

1 Like

That fixed it for me. Thanks.

Just want to say thank you for this script…it is fantastic!!! It is helping my studies alot.

1 Like

Hello and thank you for the script!

Is there a way for the script to remember progress in one category? Some kind of savestate? I want to do a 2nd pass on my burned items (like 90% of the people using this, I guess) but right now it’s serving me random burned items. I guess I could make new templates where its burned but also by-level and separate it into chunks myself. huh. Is there another more automatic way?

2 Likes

There isn’t currently a way, though that’s a good idea. Next time I’m working on this script, I’ll look into what it would take to add your suggestion.

3 Likes

Is there a way to have a direct WaniKani link to the current item from the Self-Study Quiz modal? Like a new icon next to the question mark?

1 Like

@toxinu,
Something like that is on my to-do list. But it’s not going to happen soon, unfortunately.

1 Like

Is there a way to export the self study quiz with all its configurations to a another computer? What about doing the same with other scripts?
I’ve tried doing it using the tampermonkey export/import utility but it didn’t work.

I dont remember if I asked here before:

is it possible to show the items in vertical mode? Also, a way to link to jitai randomizer in order to have nice fonts installed in my pc?

@guiljb,

Open the Javascript console (press F12 and click on the Console tab) while on the Wanikani desktop, and paste the following mini-scripts for managing settings:

function list_settings() {
   console.log(Object.keys(wkof.file_cache.dir)
      .filter(name => name.match(/^wkof\.settings\./))
      .map(name => name.slice(14))
      .sort().join('\n'));
}

function get_settings(script_name) {
   wkof.include('Settings');
   wkof.ready('Settings').then(function(){
      wkof.Settings.load(script_name).then(function(){
         console.log('{name: "'+script_name+'", data: "'+btoa(JSON.stringify(wkof.settings[script_name]))+'"}');
      });
   });
}

function save_settings(settings) {
   wkof.include('Settings');
   wkof.ready('Settings').then(function(){
      wkof.settings[settings.name] = JSON.parse(atob(settings.data));
      wkof.Settings.save(settings.name);
      console.log('Saved!');
   });
}

Now, you can list all of the script names with stored settings:

list_settings()

Example result:
image

Get the settings for a particular script as a string, which you can store somewhere or email to yourself:

get_settings('ss_quiz')

Example result:
image

Copy the output, including the { } braces and everything between, and save is somewhere or email it to yourself.

On the destination computer, paste the Javascript functions from above again, then run this command:

save_settings(xxxxxxx)

But replace the xxxxxxx with the settings that you saved/emailed.

Example results:

4 Likes

Hmm… smells like a meta userscript opportunity. :grin:

Yeah… Back when I originally designed the framework, I designed it with a means for someone to write a ‘Sync Settings’ script, which would do exactly what I did above, but with some sort of server to optionally store people’s settings if they wanted.

I knew I wouldn’t have time to implement it myself, though.

1 Like

Thank you very much @rfindley !
That will be very helpful!

1 Like

Challenge accepted. <laugh>

I’m still deep in the weeds with a crazy amount of recent learnings as I work on the Ganbarometer でぶ edition.

I’ve figured out how to write svelte components for WK userscripts, using jest to test and rollup to package as an iife for tampermonkey, as well as msw to mock the API/wkof interactions and @mswjs/data with faker to flesh out the mocks for testing. Oh, and all while developing in typescript with live updates to my browser. All of that is as insane and unnecessary to write a simple little userscript as it sounds.

I never intended to learn so much about front-end development, but, sheesh, everything about it is a hellaciously tempting loose thread in the biggest sweater imaginable.

Anyway, something simple like a sync-setting script will eventually be a nice change of pace.

2 Likes

Nice! I’m glad to see someone playing with Svelte. I’m hoping to spend more time with it on my next web-oriented project. (Whenever that may be…)

If you do build a Sync Settings script, I would love to see your workflow, and especially the hot reloading. Time travel is also fantastic in certain use-cases, though I don’t see that being useful for something as simple as Sync Settings.

3 Likes