WK Real Numbers (userscript)


#1

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!

Unofficial FAQ
List of API and Third-Party Apps
WaniKani Denial Mode
WK Fake Numbers (userscript)
Firefox extension?
#2

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!


#3

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

#4
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...

#5
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.

#6

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


#7

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:


#8
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? :D


EDIT: ignore the first req. I've commented out the alert :D
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 >_<.

#9

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


#10
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)

#11

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:


#12
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!!

#13

Nice, thank you :slight_smile:


#14

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


#15

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


#16
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.

#17
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

#18

Nice. Will check it out.


#19
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.

#20
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.