Script Compatibility Mode v2.0.0: IDs only in reviewQueue

The Script Compatibility changelog has been updated:

  • Compatibility Mode Off:
    • $.jStorage.get("reviewQueue") now contain ids instead of objects.
    • The ids are retrieved from /review/queue?minimal=true. /review/queue still returns the full objects in Compatibility Mode.
    • The objects are retrieved in a separate request to /reviews/items?ids=1,2,3, which returns the full objects for ids 1,2,3.
4 Likes

When/how is this triggered? If a script changes the active queue in jStorage, will some event get triggered so that the official WaniKani code automatically loads the data for those active items? Or will the script have to do something extra to explicitly load the data?

1 Like

I had the same question in the back of my mind. Probably still reading $.jStorage.get(‘currentItem’) whenever a UI change (e.g. during submit) is called for.

Fwiw, looking through the code is quite helpful… once you figure out how to make use of the sourceMappingUrl. I’m sure there’s an easier way than what I’ve figured out so far.

I’ve looked through the code several times in the past, back when I was actively creating scripts. At this point, I’m just trying to make sure one or two of my scripts don’t break, so I’d prefer not to spend that kind of time if I can avoid it.

1 Like

Slight typo, as far as I see, it’s /review/items, without the plural
Also, interesting to see, that I can only get data for the items actually in my review queue, would’ve been nice to get it for any item, but I guess this is great too.

1 Like