[UserCSS] Blur English translations in vocab sentences

I found that I kept accidentally reading the English translations of vocab example sentences while trying to figure out what they meant, so I wrote a simple bit of CSS to blur them out.

Here’s an example of what it looks like (it works on the lesson page too, but I don’t have any vocab lessons right now to show it off):

You’ll need Stylus (Chrome/Edge, Firefox, Opera) or xStyle (Chrome/Edge, Firefox), or a more manual CSS injector like Stylebot (Chrome/Edge, Firefox) to use this CSS.

You can hover over the blurred sentence to unblur:

bF3VcGGMRU

Link to UserCSS.

Enjoy!

7 Likes

There is also this script. It also allows you to reveal the context sentences by hovering over them.

2 Likes

I tried to search for similar things on the forum, but I guess my queries weren’t wide enough. Ah well.

2 Likes

Looks pretty! And now people have the choice of scripting or CSS’ing :+1:

3 Likes

The forum software’s search kind of sucks

2 Likes

Hello, I found this useful and nice-looking, so I rewrited the css so it can match the new version of the website (see code below). I don’t know how to provide a proper Link to UserCSS though… Sorry !

If you want to use my code, you’ll need to install Stylus or xStyle with the links provided by @Unlocked,

and then install his code by clicking on his “Link to UserCSS” link,

and then inside the Stylus extension, get inside the “Wanikani Hide Sentence Translation” Style, and replace the code by my modified version.

I hope it’s all clear :blush:
Enjoy !

My modified version :

/* ==UserStyle==
@name Wanikani Hide Sentence Translation
@namespace Blurs the English translations of example sentences on vocab pages and lessons for Wanikani. Hover to unblur. · GitHub
@version 1.0.0
@description Blurs the English translations of example sentences on vocab pages and lessons for Wanikani. Hover to unblur.
@author Unlocked // 2024 update by nicgd
==/UserStyle== */

@-moz-document domain(“wanikani.com”) {
/* nicgd : I changed the class name /
.subject-section–context p:not([lang=“ja”]) {
display: inline-block;
filter: blur(4px);
transition: filter 1s;
}
.subject-section–context p:not([lang=“ja”]):hover {
/
need this to be non-zero because of weird rendering issues. */
filter: blur(0.1px);
}
}

1 Like

Hi, I tried to install your version but it unfortunately does not seem to work. I think the forum removed some of the symbols in the code, such as *. Could you try posting your code as a code block? (enclose the code with ``` in the message editor on both ends) Thanks!

2 Likes

Oh yes sorry, you’re right! It seems that double dashes were changed to long dashes (among other issues…). Is this working better? :

/* ==UserStyle==
@name           Wanikani Hide Sentence Translation
@namespace      gist.github.com/TheUnlocked/c2e3aa361c35e2c468fd98c26300c251
@version        1.0.0
@description    Blurs the English translations of example sentences on vocab pages and lessons for Wanikani. Hover to unblur.
@author         Unlocked // 2024 update by @nicgd
==/UserStyle== */

@-moz-document domain("wanikani.com") {
/* changed the class name in both paragraphs (@nicgd) */
.subject-section--context p:not([lang="ja"]) {
    display: inline-block;
    filter: blur(4px);
    transition: filter 1s;
}
.subject-section--context p:not([lang="ja"]):hover {
    /* need this to be non-zero because of weird rendering issues. */
    filter: blur(0.1px);
}
}
2 Likes

Thanks for the help! I went ahead and also added the context-sentences class since that’s needed for it to work in lessons, and while I was at it I decided to reorganize it to take advantage of the new CSS Nesting feature. The link in the original post has been updated to always use the latest version of the gist, so you should be able to click it to install the updated UserCSS.

1 Like

Great, thank you !
I’m happy we could revive this tool :blush:

Thanks! This version works.

1 Like

Thank you :blush:
By the way, @Unlocked has published a better version (also works in Lessons). You can install it using his original link. Happy reviews!

1 Like