[Userscript] Wanikani Heatmap

Unfortunately it still doesn’t work. Maybe there is another userscript that is in conflict with the heatmap?

1 Like

Turn off all other scripts and see whether the problem is still there. If not you can pinpoint the culprit by turning back on the other scripts one by one and see which one brings the problem back.

2 Likes

Yeah, you’re right :rofl:

Deactivated everything except Open Framework and Heatmap and still doesn’t work

2 Likes

Are you still seeing the Syntax Error in the console and the red error in Tampermonkey?

No red error in Tampermonkey, this is the console log:

@prouleau I don’t suppose you can make sense of what the error is referring to?

@rfindley Could that generate_token error be from the WKOF?

1 Like

It looks like there is an error in an anonymous function evaluated by eval. I can’t figure out whether this is the whole script or some inner use of eval.

If we could click on the links the console would open a window on where in the code the error occurs. That would be informative.

1 Like

Do your other scripts work as they should?

Yes, I didn’t notice malfunctions.
If I click on my profile pic on the dashboard should I see the settings for this script?

@prouleau When I click on one of those links it just opens the dashboard html source on the source panel, but it doesn’t highlights anything in particular on the code.

Could it be that regex lookbehind syntax isn’t supported yet on Safari and the heatmap script uses it on line 1587? That would match the syntax error for the regular expression at least.

3 Likes

Doesn’t look like it. Wkof’s Apiv2.js has a function called generate_apiv2_key(), but not generate_apikey() or generate_token().

1 Like

Thinking a bit more… Wkof may be trying to generate an api token, but maybe WK itself is failing. The user could try generating a token manually if there isn’t one already.

2 Likes

Oh, good catch!

@Greed992 I have updated the script to remove the negative lookbehind. See if version 3.0.46 works for you. If it doesn’t try going to the API Keys page and generating a new one

3 Likes

It works now! I just updated the script.

Thank you for your help :grin:

3 Likes

No 2022 data. :crying_cat_face:

Is this just a settings problem for me, or is something perchance broken with the new year?

1 Like

Hmm, it should have showed up as soon as you had forecast reviews in 2022. Maybe try reloading your reviews in the settings?

That didn’t make 2022 show up.

1 Like

Can you check which version of the script you have installed?

v3.0.5 :sheep:

Updated to v3.0.47 and 2022 is now showing up. Thanks!

Really one of the best userscripts out there.

2 Likes

Nice! Glad you got it working