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

You might try create a Greasyfork account, and copy the code from here WaniKani JJ External Definition - Source 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, "")

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?

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).

1 Like

Thank you! I will do that then.

Okay, I have just created as pseudo-API for userscript, see here GitHub - patarapolw/wanikani-userscript: A GitHub source for `polv`'s userscripts

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.

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.

I’ve been getting this fairly constantly. So it’s caused by add-on’s making too many requests?
I have a few add-ons that aren’t essential I’ll try turning those off.

I have not encountered this from any other script other than the old External Definition script, but yes, that’s usually the root cause.
You may want to look at the browser console to get an idea of what might trigger these requests.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.