WK Real Numbers (userscript)

Since the nice API has been released I figured I’d do something useful that implements it.
So here is WaniKani Real Numbers!

The main purpose of this user script is to turn this:


into this:



Latest version: v2.8

Download and more info
: http://userscripts.org/scripts/show/153756

Known issues:

  • None!

I’ve tested it in Chrome and Firefox with its respective monkeys (harr harr) and it hasn’t blown anything up… yet.
If it blows up or you manage to break it or have any other feedback, please let me know!

2 Likes

Works great on Safari 6.0.2 with Ninjakit. Awesome how much we can do with the API!
We need more access… more data… moooooore DATA!

How do I get to the userscript menu in Chrome? I’ve installed the script, but now every time I load a page it says: “WaniKani Real Numbers has no API key entered!

Press OK to go to your settings page and retrieve your API key!” then I click OK, it loads my profile, and says, “WaniKani Real Numbers API key set to: xxxxx”, I click OK, and then it repeats again on the next page… hmmm

Konnect said... How do I get to the userscript menu in Chrome? I've installed the script, but now every time I load a page it says: "WaniKani Real Numbers has no API key entered! Press OK to go to your settings page and retrieve your API key!" then I click OK, it loads my profile, and says, "WaniKani Real Numbers API key set to: xxxxx", I click OK, and then it repeats again on the next page... hmmm
 Are you using Tampermonkey? I'm not sure how it works if you install it natively in chrome. Let me have a look...
Konnect said... How do I get to the userscript menu in Chrome? I've installed the script, but now every time I load a page it says: "WaniKani Real Numbers has no API key entered! Press OK to go to your settings page and retrieve your API key!" then I click OK, it loads my profile, and says, "WaniKani Real Numbers API key set to: xxxxx", I click OK, and then it repeats again on the next page... hmmm
 Getting this as well. Installed the script natively.

Both of these are super cool. Thanks for making our lives easier.

Nice script. btw. two things :slight_smile:

I’m getting this box almost every refresh:



The other thing is, since you know Javascript… When doing reviews, there are shortcuts for playing sound, for showing hiragana, etc… but the shortcut for the sound is also a chrome shortcut for focusing on the omni bar. Is it possible to change that shortcut to something else? :smiley:


EDIT: ignore the first req. I’ve commented out the alert :smiley:

Konnect said... How do I get to the userscript menu in Chrome? I've installed the script, but now every time I load a page it says: "WaniKani Real Numbers has no API key entered! Press OK to go to your settings page and retrieve your API key!" then I click OK, it loads my profile, and says, "WaniKani Real Numbers API key set to: xxxxx", I click OK, and then it repeats again on the next page... hmmm
 
McMaNGOS said...  Getting this as well. Installed the script natively.
I tested that as well and I doesn't work due to the fact that data is stored using GM_ functions. Chrome has no built in support for that so the easiest way to get it to work is for you to install Tampermonkey (https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo). After that install the script again using Tampermonkey and it should work out fine.

Phantomeye said... Nice script. btw. two things :)

I'm getting this box almost every refresh:



The other thing is, since you know Javascript… When doing reviews, there are shortcuts for playing sound, for showing hiragana, etc… but the shortcut for the sound is also a chrome shortcut for focusing on the omni bar. Is it possible to change that shortcut to something else? :smiley:


EDIT: ignore the first req. I’ve commented out the alert :smiley:

Woops! Sloppy debugger-me forgot to remove that ><! Will remove it and push an update! (Shame on me (/□\*)・゜)
EDIT: On your second thing, I’m not sure but I will see what I can do. Firefox has that issue too, the shortcut for more info is the same as bookmarks >
<.

v2.3 is out. Please update to remove that silly alert I forgot! (T_T)

penx said... v2.3 is out. Please update to remove that silly alert I forgot! (T_T)
 Hehe, don't worry about it. When I'm doing my thing, I always put prints everywhere I can :D (python :P)

Awesome, thank you! Now I’ll have to wait for 42+ reviews to really try it out. ^^ So far it at least doesn’t give any errors anymore (after installing Tampermonkey), so it seems to work fine on Chromium (or, in my case, Comodo Dragon) too. :slight_smile:

penx said...
Konnect said... How do I get to the userscript menu in Chrome? I've installed the script, but now every time I load a page it says: "WaniKani Real Numbers has no API key entered! Press OK to go to your settings page and retrieve your API key!" then I click OK, it loads my profile, and says, "WaniKani Real Numbers API key set to: xxxxx", I click OK, and then it repeats again on the next page... hmmm
 Are you using Tampermonkey? I'm not sure how it works if you install it natively in chrome. Let me have a look...
 Ahhhh. Okay. I wasn't using Tampermonkey. I am now, and no issues so far. :D Thanks!!

Nice, thank you :slight_smile:

After first installing it and getting an API key, it showed “undefined” for both numbers for about a minute. Now it shows the actual numbers correctly. Just wanted to mention that in case anyone else asks about the same thing, just wait a minute and see if it gets the actual numbers. After that, it just updates to the real numbers on each page reload like normal.

(Greasemonkey 1.5 on Firefox 17.0.1, if you needed to know.)

Now we just someone (or you :slight_smile: to make a script that replaces approximate time with accurate time:

about 12 hours -> 11 hours 49 minutes

Phantomeye said...
penx said... v2.3 is out. Please update to remove that silly alert I forgot! (T_T)
 Hehe, don't worry about it. When I'm doing my thing, I always put prints everywhere I can :D (python :P)
I always print everything that I can no matter the programming language :). I sometimes catch my self adding ; at the end of lines when typing normal stuff too >_<.


Kimura said... After first installing it and getting an API key, it showed "undefined" for both numbers for about a minute. Now it shows the actual numbers correctly. Just wanted to mention that in case anyone else asks about the same thing, just wait a minute and see if it gets the actual numbers. After that, it just updates to the real numbers on each page reload like normal.

(Greasemonkey 1.5 on Firefox 17.0.1, if you needed to know.)
 Ok. I'm pretty sure I know what's causing that. I'll fix that in a new version tomorrow (2am atm O_o).


Satoshi said... Now we just someone (or you :) to make a script that replaces approximate time with accurate time:

about 12 hours -> 11 hours 49 minutes
 Great idea! I'll see if I can script something for that.
penx said...
Phantomeye said...
penx said... v2.3 is out. Please update to remove that silly alert I forgot! (T_T)
 Hehe, don't worry about it. When I'm doing my thing, I always put prints everywhere I can :D (python :P)
I always print everything that I can no matter the programming language :). I sometimes catch my self adding ; at the end of lines when typing normal stuff too >_<.


Kimura said... After first installing it and getting an API key, it showed "undefined" for both numbers for about a minute. Now it shows the actual numbers correctly. Just wanted to mention that in case anyone else asks about the same thing, just wait a minute and see if it gets the actual numbers. After that, it just updates to the real numbers on each page reload like normal.

(Greasemonkey 1.5 on Firefox 17.0.1, if you needed to know.)
 Ok. I'm pretty sure I know what's causing that. I'll fix that in a new version tomorrow (2am atm O_o).


Satoshi said... Now we just someone (or you :) to make a script that replaces approximate time with accurate time:

about 12 hours -> 11 hours 49 minutes
 Great idea! I'll see if I can script something for that.
 Or replace the percentage on review page with actual number of reviews :P

Nice. Will check it out.

Satoshi said... Now we just someone (or you :) to make a script that replaces approximate time with accurate time:

about 12 hours -> 11 hours 49 minutes
 Actually, it's already possible to view that. Just mouse-over the approximation and it'll show you the exact date & time when your next review will become available. Like this: http://i.imgur.com/u8beV.png

I guess it'd be more convenient to have the exact time displayed instead of the approximate time, though, so an add-on would certainly be nice.
McMaNGOS said...
Satoshi said... Now we just someone (or you :) to make a script that replaces approximate time with accurate time:

about 12 hours -> 11 hours 49 minutes
 Actually, it's already possible to view that. Just mouse-over the approximation and it'll show you the exact date & time when your next review will become available. Like this: http://i.imgur.com/u8beV.png

I guess it'd be more convenient to have the exact time displayed instead of the approximate time, though, so an add-on would certainly be nice.

 Yep, I've known about that since they added it but this would be more convenient instead of having to hover over it until the time appears and then calculate the time difference.