[Userscript]: WaniKani Ultimate Timeline

Yeah I have a similar problem, mine used to work without a problem and now all of a sudden it claims
“It seems you haven’t generated an API key yet.
Please click [here] to generate one automatically.”

The thing is, the script tries to find the API key under “settings/account” and apparently it is now sitting under “settings/personal_access_tokens”.

Seems like WK switched some things around and the script needs to be updated.

1 Like

Is this the reason none of my scripts are working? I’m in shambles.

The issue is with WKOF not finding the API-key, not Ultimate Timeline. You can set it manually in the console like this

wkof.Apiv2.key = apikey;
localStorage.setItem('apiv2_key', apikey);
1 Like

Thanks, @Kumirei

Now that the new Apikey page is live on WK, I’ve updated the Open Framework.
Anyone who is having trouble, be sure to update your Open Framework script [here]


I’ve updated and reinstalled WKOF, it’s on version v1.0.37 now. It’s still not working though (same problem as before.)

@Kumirei Thanks but that didn’t work either sadly.

The error in your post above is because you included the <> around your API key. It should just be in quotes.

But that’s not necessary now anyway. Open Framework can fetch your key on its own now.

Do this first (in the Javascript console, while on the Wanikani Dashboard):

delete localStorage.apiv2_key

Then refresh.

(Of course, as always, Open Framework needs to be the first script to run. See [here] if you’re not sure what I mean.)

Belated thanks for this script! :slight_smile: (since I’m only discovering it now lol)

1 Like

Weird, it’s still not working for me.

It’s still leading me to the settings page instead of the API-Tokens page and yes, WKOF is the first script to run in Tampermonkey.

Kumi’s method didn’t seem to work either, even with “” instead of <> around the API key. It simply says “undefined”. I’ve tried both the V1 and V2 keys.

Edit: As I thought, the problem was on my end. I just trued to re-install Ultimate Timeline and turns out it wasn’t installed in the first place, I have no idea how that makes sense since it’s been on my dashboard all these time and it was working just fine yesterday but anyways, I installed it again and now I have two of them on my dashboard.

I’m not sure what went wrong here but it’s working again, I just have to figure out how to get rid of the broken Ultimate Timeline on top, lol.

Looks like you have both an old and new version of Timeline installed.

I’m guessing the old version is installed directly in the browser, rather than in TamperMonkey. Try looking in your browser’s Extentions / Add-ons / Plug-ins menu to see if that’s where it’s located.

1 Like

just installed WOF and Ultimate timeline, however it doesnt show anything and console msgs are:

indexedDB could not open!  userscript.html:342:4
UnknownError  eval line 2 > eval:335:12
uncaught exception: undefined  (unknown)
Content Security Policy: A directiva 'frame-src' está obsoleta. Por favor, use a diretiva 'child-src' em vez disso.  (unknown)
Content Security Policy: As configurações da página bloquearam o carregamento de um recurso em self (“script-src https://m.stripe.network 'unsafe-inline'”). Source: call to eval() or related function blocked by CSP.  (unknown)
uncaught exception: undefined

Do you need the paid version of WaniKani for these types of plugins to work? The ultimate timeline is not showing up for me despite following all the proper instructions.

This usually means you are using Firefox, and Firefox has corrupted the indexeddb. You can try clearing cache, or specifically just indexeddb under the storage are of the developer tools (I’m on my tablet right now, so I can’t look up what it’a called). Worst case, reinstalling Firefox usually helps, but isn’t necessary.

(Firefox has a lot of issues with indexeddb… or did at one time and people only discover the corrupted indexeddb when they start using OpenFramework)

1 Like

It works on free acounts. Try opening your Javascript console to see if there are any errors reported. To open the Javascript console, press F12 and click on the Console tab.

Also, what browser are you using?

Wiped every sqlite and cache, however the script only works if I set the ignore_missing_indexeddb to true.

Thanks for leaving it there!

Just so you know, using ignore_missing_indexeddb may trigger Wanikani’s API rate-limit (“too many requests” or whatever), especially as you reach higher levels.

You may also want to see if indexeddb is disabled by your security settings in the browser. Assuming you are using Firefox, if you have enabled “Always use private browsing mode”, indexeddb is disabled.

Is there a way to hardcode the API into the old timeline script?

This one:


I really miss the green screen across the graph.

The script worked fine until the Firefox problem last weekend–now it can’t find the API key. It still works in Waterfox.

If the script still works then I think you should be able to set the API key manually by putting the following in the console. You need to change API-KEY out for you V1 key.

localStorage.setItem('wkt_Vorpal_apiKey', "API-KEY")

I get this error:

[Exception… “Component is not available” nsresult: “0x80040111 (NS_ERROR_NOT_AVAILABLE)” location: “JS frame :: debugger eval code :: <TOP_LEVEL> :: line 1” data: no]

I put this into the console after the script loaded and tried to find the api key.

You could also try replacing the line

apiKey = localStorage.getItem(localStoragePrefix + 'apiKey');


apiKey = "API-KEY";

in case I messed up the local storage key.

You are my hero!

Thank you so much!

1 Like