[Userscript] Highlight Kanji based on WK level in websites

Oh Looki, you rock ! Thanks !  i directly tried it and it works perfectly !!!

Unfortunately it doesn’t seem to work with Facebook’s status… :confused: But still an amazing script though !

That’s because the script only runs once when the page is loaded, and Facebook loads them dynamically :slight_smile: I could add a “Rescan page” command or so!

If rescan page worked on embedded/in-browser PDFs…

Oh I see… I’m kinda noob for scripts ^^’

But that would be nice to be used for any kind of website (including Facebook) and PDF like ‘ocac’ said. Your script really helps me to directly see the amount of kanji i should be able to read when i look at any Japanese text. Then little by little, as green kanji are increasing, this is a great source of motivation.

Update which has a re-scan option for dynamic pages like Facebook etc. (shortcut ctrl+alt+R). I also added the open website shortcut to ctrl+alt+O, and the letters you need to press for the shortcuts are now underlined in the command menu.
Unfortunately it seems like modifying PDFs at runtime is impossible. :confused: In fact, I was able to modify Firefox’s PDF viewer GUI, but not the actual PDF content…

http://userscripts.org/scripts/show/449147

It works perfectly fine for Facebook ! Thanks a lot !!

The script now recognizes the level 46 kanji 孔 that was added on May 1. However, you need to select “Reset level dictionary” in the menu for it to work.

looki said... The script now recognizes the level 46 kanji 孔 that was added on May 1. However, you need to select "Reset level dictionary" in the menu for it to work.
Thanks for making such a useful app ^.^
I did the reset level dictionary and it didn't work for me though o_O
Also the script used to tell me the level I would learn something when I hover over the kanji, but it doesn't seem to do that any more.
Loving the app though. Especially when I see something with the black highlighting. So I can add it to my anki if it looks important ^.^ Brilliant~

Hmm, that’s strange, it should work :frowning:
Oh yeah, I removed the tooltip feature for efficiency, but you can now press control+alt+o to open selected kanji on wanikani.com (or jisho if unavailable)

Links to the script aren’t working =[

NinKenDo said... Links to the script aren't working =[
 Looks like userscripts.org itself is down right now, last time it took a few days to come back up.

I bet the userscripts.org guy is just playing mind games on me. I always had this irrational fear the site would be down soon - which is why I didn’t use it until a few weeks ago…

https://greasyfork.org/scripts/722-kanji-highlighter



Looks sweet man :smiley:
I have one suggested modification though. Adding an alpha setting.
In the jisho.org furigana for example, the background gets in the way of the hiragana, the alpha setting makes sure you can at least read it.


I haven’t looked into how the GM settings manager works but here’s a modified version I’m using now to show the general idea:
https://gist.github.com/Beanow/431f28d4a3d4dfb47d00

You’re right! I’ll experiment with it. My only concern is slow rendering on long articles.

Hmm it could be an issue. Though I think FF and Chrome use hardware rendering by default now. So it ought to be fine. You can test it though. And if you make the alpha value a setting, you could set it to fully opaque if the performance part is an issue.

Hey, is there a way to prohibit running a particular tampermonkey script on particular websites? Like a per-script blacklist of URLs?

Adding https://www.wanikani.com/* to user excludes does the trick

looki said...
1. Haha, no. I requested a full list of Kanji from WaniKani's API.
 Doesn't the API allow you to only list the vocab/kanji from your levels, not all?

Nope, it allows you to access any level. You just need to specifiy the list of levels as an API parameter (1,2,3,4,5,6,…,50), see https://www.wanikani.com/api/

(Seems like you’re not a paying member yet - if you become one, you can preview any kanji from the upper levels, but you can’t review them)

looki said... (Seems like you're not a paying member yet - if you become one, you can preview any kanji from the upper levels, but you can't review them)
 Ah, that explains it then. Thanks. I was actually interested in incorporating WaniKani level data into my project, though I'm not sure if I'd be allowed to.