[Userscript] Simple Show Context Sentence

The wiktionary entry is fascinating. Thank you for that.

1 Like

I’ve been using this script for a while and absolutely love it. Unfortunately, the new UI update completely broke this script (among many others). Is there a chance this script will receive an update? I rely on it quite a bit.

1 Like

It’s fixed. v1.1. over on GreasyFork

2 Likes

Last night’s update changed a bit of DOM and broke this script again.

Fixed in v1.1.1 over on GreasyFork

4 Likes

Doesn’t randomize context sentences? What will happen if no context for that vocab?

Doesn’t show up in Extra Study. (Simply missed a @match.)

That’s right. It simply takes the first sentence in the list. I kinda like it this way, so…

I haven’t run across any vocabulary word that doesn’t have a context sentence, if there’s none, the javascript will likely drop an error in the console, and it’ll be as if you didn’t have this script installed.

I don’t use Extra Study. I should but that’s another issue entirely. Pull requests are welcome if someone wants to make it work for that feature.

Pull Request?

Anyway, this one is really just one additional line.

// @match       https://www.wanikani.com/subjects/extra_study*

The script is on GitHub

I didn’t realize that was all that was necessary. I’ll add that when I get a chance, or if you want a PR metric on GitHub, open one and I’ll merge. :slight_smile:

Your pull was merged and GreasyFork updated. Thanks.

Thanks for the script. It works great.
Is there a script like this that puts example vocab below kanji?

1 Like

There is! :slight_smile:

1 Like

Is this script still working? Can’t manage to make the example sentence appear even by making this script the second with highest priority, behind the open Framework

I didn’t know about it so thanks for that!

I just tried and it works for me in recent mistakes after adding the line:

// @match       https://www.wanikani.com/recent-mistakes*

under the others @match

I’ll check if it work in review when i have some :sweat_smile:

Edit:
It also works in the review so i don’t know if you have other issues… try checking the browser console i guess

Thanks for the reply @matt_llvw

It’s quite strange… I have the js file and console didn’t accuse any errors, yet we can see that the context sentence is not appearing… Do you have an idea why that could be the case?

I have not made any configuration as I thought the changes would appear automatically after enabling the script on Tamper Monkey

ah!
example sentences only exists in vocabulary, not kanji!

(i already ha the same issue while dev an app…)

Oh! That’s strange haha I was sure that it didn’t appear on vocab, but now it’s really appearing.

Thank you very much!

Since WaniKani has recently changed all the fonts on the website to Noto Sans, are you going to also make it default, or at least make the font (and font size) configurable? Should not be hard using the framework. I may try sending a PR if I have time.

I’m the original author of the userscript, and no, I have no plans to change the script to discontinue the use of Google’s sawarabi mincho font.

I happen to really like that font. But beside that, I don’t necessarily agree that a single court ruling in Germany should result in the entire planet deeming IP addresses personally identifying information. If a user has a Google account, then that user has already consented to letting Google use their IP address for analytical purposes. If a user doesn’t have a Google account, then they should not be able to map an IP address to a user, and in fact doing so, would be a violation of GDPR by Google, not WaniKani.

It is hard to see how this ruling would survive appeal, but it will likely never be appealed because the cost of doing so, for a $100 fine would be prohibitive.

As an aside, that CookieYes site referenced by TofuguScott in the other thread seems to have a vested interest in stirring the pot on this matter as they sell cookie consent software solutions. So of course they welcome this rogue court decision because it helps sell their software.

And a simple look at the network traffic on a reload of WaniKani’s homepage shows that it does POSTs to www.google-analytics.com and GETs from half a dozen other third party sites.

To single out google fonts here seems a reaction to a badly argued court case.

First of all, thanks for the script, it’s really useful!

My question wasn’t related to GDPR concerns at all and I simply just like the look of Noto Sans, and would prefer to use it personally, or any other Gothic font since I find them easier to read compared to Mincho ones. So ideally, it would be great if the font would be configurable, leaving the current one as default (for consistency).

I’ll accept a PR that adds a configuration option as long as the google font is left the default.