Quick and dirty bulk revision of kanji

Been away from WK for a while and need a quick refresher?

I know there are scripts and such, but a quick solution is to just open the kanji page (e.g. “pleasant”, “painful”) and put this into your developer console (F12 in Chrome)*:

ks = $('.subject-character--grid')

ks.each( (i, k) => {
    const meaning = $(k).find('.subject-character__info')
    $(meaning).css({'opacity': '0'})

    $(k).on('mouseenter', _x => {
        $(meaning).css({'opacity' : '1'})
    })
    $(k).on('mouseleave', _x => {
        $(meaning).css({'opacity' : '0'})
    })
})

It’ll hide the kanji meanings/readings until you hover over them, so you can quickly refresh

*normally you shouldn’t put random code into your browser, but I swear this is safe :slight_smile:

2 Likes

Here’s the script if you need it:

2 Likes

Uncaught TypeError: ks.each is not a function
(I don’t need this, just tried it because I was skeptical of it working for a different reason: didn’t WK stop using jQuery a while back?)

1 Like

It did, but depending on which other user scripts you have installed, one or more of them may load jQuery globally on the page.