Knowledge required to Create a Script

I see so many people here creating scripts to help fellow wankanians out , and I wanted to learn how to create some of these scripts as well. Considering knowledge of a few programming languages, can someone point me in the right direction on how to learn developing these scripts ?

Thanks in advance! 

1 Like

The language you will need is Javascript, and the jQuery framework ( is very useful.

jStorage is where the data is held (

Also download the source of some of the existing scripts. Find some good ones in ShotgunLagoon’s excellent list thread ( and see what people are doing - how to set up the Greasemonkey part for example.

Also, greasy fork is a good place to host your script (


You will need to know how to code I presume, I’m no programmer but I’m pretty sure you will need to know JSON in order to do it as well as the fundamentals of the coding languages.

One thing I would keep in mind is a clear idea of what exactly you’re trying to create, and how that fits within certain programming frameworks.  I know that a lot of people have all of these ideas for browser add-ons, but there are quite a few that really shouldn’t be add-ons - they only make a very small number of requests for info from the website, and the rest of the program would be a lot more involved in terms of then using that data as desired.  In those cases, you would be better served with another scripting language, like Python or Ruby, that makes those occasional requests, and just packaging that as a program people can download, rather than a browser add-on.  Just something to keep in mind.

1 Like

What is the answer other than HTML, CSS and Javascript? jQuery and jStorage?

BTW, there is no Userscript or Tampermonkey/Greasemonkey course in Udemy, but there is jQuery.

userscript tutorial - Google Search doesn’t seem useful to me. Not even Radar – O’Reilly

$ is something new to me.

I did create [Userscript] WaniKani Hide Buttons in Review, but I didn’t use $, and I couldn’t add complex stuff…

Also, what IDE do I need for making a Userscript?

The jstorage website looks to be trying to install a malicious plugin. You can get documentation direct from the github page instead.

1 Like

Also you can see wanikani JS API and global objects by printing window object in console.
This would return different results based on which page you are on. For example during a lesson session, a review session or on dashboard.

Also other script which define global objects can also be inspected here. Like Dashboard Progress Plus script has following global object name wkdpp

This thread is two years old :wink:


$ is a shorthand for jquery functions. There are plenty of courses on that around. If you wanna store values/settings, then jStorage is good to look into yea.

There probably aren’t many tutorials on user scripts because there’s nothing much to teach i guess? It’s not really like teaching someone to make a general-purpose program. Each script is a hack for a specific website, so you just need to start doing it to learn it. Any GM specific functions you can learn from looking at their documentation (although I prefer my scripts without them). Tampermonkey is just a program that executes whatever javascript you feed it, so you should just learn how to program in JS…

I use no IDE. I just try out some javascript in the browser console and the rest i type directly into the Tampermonkey ‘new script’ window. And then test/debug after I’ve finished.

Especially if you don’t know how to program yet and/or are new to JS, try to set realistic expectations for yourself. Learn how the WK website works, look at lots of other scripts (good to learn how somebody solved a problem you may have) and start with some easy stuff. If you look at my early scripts, they’re not that mind-blowing either. I just tried to make something with what I knew I could do at the time.

1 Like

oh wow. didn’t see that. :smiley:

What knowledge is required to

  1. Run the script after entering the correct answer in *://*, that is, after the website has changed? Event Listener?
  2. Inspect Elements not shown visually on the website, e.g. Javascript

BTW, this is my current script – Dropbox - blacklist.js - Simplify your life

For 1., take a look at my script at github:
wanikani-userscripts/utility/wk_interaction.js at master · mwil/wanikani-userscripts · GitHub

For the reviews I currently look how the jStorage changes after a question was answered. You could probably reuse it by @require’ing it and listening for its events. Check my other scripts on github on how to use it.

For 2. you can see the other sources in your browser’s developer pane. But it’s not clear what you want to do.

1 Like

For example, I couldn’t figure out how to remove Meaning, here, and add a box like Part of Speech.

@polv You can reference the pitch info script, they add new elements into the left side (it’s div#item-info-col1).

You can also hide and delete elements in the developer pane on the actual page when you right-click on the element, you can see what will happen. In your code you have to select it (for example by its ID item-info-meaning) and just delete it.

Eventually, I use waitForKeyElements and it works.

My current script: Dropbox - blacklist-stable-0.1.2.js - Simplify your life

I am trying to create “Looking for a different answer”, and I now require [Userscript] Prevent "Your answer was a bit off" answers from being accepted a.k.a. "Close But No Cigar" to work with (Obsolete) [UserScript] WaniKani Double Check - #72 by rfindley and also with my script… because I feel my script looks partly like No Cigar (and probably partly like [Userscript] Wanikani Multiple Answer Input in concept).

About MutationObserver and observer(), the answer must be javascript - Mutation Observer for creating new elements - Stack Overflow