{"error":"Rate limit exceeded","code":429}


#21

You might try create a Greasyfork account, and copy the code from here https://www.greasyfork.org/en/scripts/35970-wanikani-external-definition/code

You can filter out the img tag using Regex, and without jQuery using

html.match(new RegExp(`<ul[^>]*id=['"]?${id}['"]?[^>]*>(.*?)<\/ul[^>]*>`, "i"))![0]
        .replace(/<img[^>]*>.*<\/img>/gi, "")

#22

That part is clear to me so far; although I would rather lean towards rewriting the image URLs to be fully qualified so one can actually see the images (if they are not too large, that is). I haven’t yet looked into it, will experiment over the weekend, I guess.

I was more wondering about how to publish the new version on Greasyfork under the same script name? (If that’s possible at all)
Because I assume that the script “belongs to you” on Greasyfork so that not any arbitrary person can replace it?


#23

You can create a new script with the same name, because every script gets a different prefix number, which is the “35970” in polv’s link above. People will have to manually install from your version’s url the first time, but after that it should update automatically from the new url (if the user has updates enabled, of course).


#24

Thank you! I will do that then.


#25

Okay, I have just created as pseudo-API for userscript, see here https://github.com/patarapolw/wanikani-userscript

As I cannot test the UserScripts myself, I would probably not go further.

I might explain on how to use Node.js modules in Userscript in another topic sometimes later.

Hint: I used Cheerio.


#26

As a first step, I have released version 0.6 of the WaniKani External Definition script today. As the original post for the script is meanwhile closed, I will create a new one.


[Userscript] WaniKani External Definition v0.6