[Userscript] Wanikani DotDotDot Expander

Wanikani DotDotDot Expander

:warning: This is a third-party script/app and is not created by the WaniKani team. By using this, you understand that it can stop working at any time or be discontinued indefinitely.

Several places on Wanikani show abbreviated English meaning, such as “Undergrou…”, probably for proper display on small mobile screens. But on desktops and tablets, the full text can easily fit without being abbreviated. This script expands the “…” back into full text.

[Original script by Takuya Kobayashi (@kobayashi), currently maintained by @rfindley]

See before (left) and after (right):

On the Kanji tiles, where there isn’t room for expansion, you can hover over the tile to see the fully expanded text.

32 Likes

Awesome. Thanks for doing this!

@viet @oldbonsai

Is there any chance that this can be done on the WaniKani side? Now that the modern browsers support text-overflow: ellipsis, it should be possible to do this more neatly on your end.

3 Likes

Yeah, supporting this natively would be great.

Thank you for this script rfindley!

1 Like

I wonder @viet @oldbonsai, is this something you’ve looked into?

1 Like

[DotDotDot Expander]: No expansion found for “千円” –> “One Thousa…”
[DotDotDot Expander]: No expansion found for “大文字” –> “Uppercase …”

Updated.
Also, it’s easy to update the script if I’m ever not around to update after WK changes. You’ll see the list at the top of the script in TamperMonkey.

2 Likes

I have this script installed but for some reason it doesn’t seem to be working. Words that according to the script should be showing still turn up as dots. Tampermonkey shows it be running though, so it isn’t off. Did this script maybe not get fixed when the website updated? I don’t usually look at the vocabulary lists so I only noticed now, though it may have been like this earlier.

It seems to be working for me.
Which words are not being un-dotted, and on which page?

Also, the script relies on a manually managed list, and I don’t generally update it unless someone points me to some items that need to be added to the list. So, you may be seeing some new items.

It seems like none of the dotted ones are being converted. At any rate, a whole lot of them aren’t. I Control+F’d “…” on the levels 1-10 vocabulary page, and took a screenshot of it. If you look at the right side of it, you can see how many yellow bars there are. It said there were 116 on that page.


If the script is working for you, then it could be something odd about my device, but I don’t know what that could be. My other scripts seem to be working fine.

You can try opening the Javascript console (press F12 and click the Console tab if you are on a PC) to see if it’s reporting any errors.

But also, while checking if it was working, I did notice that the list of (…) words was significantly out of date. So, I created an updated version that uses Open Framework to automatically look up the full text.

:point_right: [v3.0.0] - Upgrade to use Open Framework to eliminate maintenance of the word list.

If anyone wants to stick with the non-Open-Framework version, please downgrade to v2.0.1 and disable updates.

3 Likes

It just works ^TM
Thanks rfindley!

1 Like

I upgraded, and the script is completely working now. Thanks for updating it!

2 Likes

This version doesn’t seem to be working for me. I’m seeing lots of … The version linked in the original post is working for the vocabulary it has, but the 3.0.0 version doesn’t seem to be doing anything.

It’s working fine for me. Do you have Open Framework installed? (And installed as the #1 script?)
Open your Javascript console (press F12 and click the Console tab), and post any errors you see there.

Yeah Open Framework is at #1. Of the errors that show, I guess it might be this one (“dotExpand” sounds relevant):

Uncaught (in promise) TypeError: Cannot read property 'data' of undefined
    at HTMLLIElement.eval (userscript.html?id=6d386793-4459-4fca-904c-eeedc82d9a69:74)
    at Function.each (application-045a6cd4e1fe902f75d2021a1321a701344c5e46db8af8149f22bf81e59a2492.js:14)
    at pe.fn.init.each (application-045a6cd4e1fe902f75d2021a1321a701344c5e46db8af8149f22bf81e59a2492.js:14)
    at eval (userscript.html?id=6d386793-4459-4fca-904c-eeedc82d9a69:69)
    at Array.forEach (<anonymous>)
    at dotExpand (userscript.html?id=6d386793-4459-4fca-904c-eeedc82d9a69:68)

Other errors:

GET https://www.googletagmanager.com/gtag/js?id=UA-1960021-27 net::ERR_BLOCKED_BY_CLIENT
GET https://js-agent.newrelic.com/nr-1167.min.js net::ERR_BLOCKED_BY_CLIENT
r @ 川:6
load (async)
__nr_require.loader @ 川:6
r @ 川:6
__nr_require.1 @ 川:6
(anonymous) @ 川:6
Refused to load the font '<URL>' because it violates the following Content Security Policy directive: "font-src 'none'".

The last one has six sub-errors which I can provide if relevant.

The first one is the one that disappears if I turn the script off (and turn the old version back on) and reload the page.

1 Like

It’s fixed (please update).
As it turns out, the problem was related to the fact that you aren’t a subscriber yet.

3 Likes

Interesting! Thanks for the quick fix!