[Userscript] Keisei 形声 Semantic-Phonetic Composition

An alternative script is WaniKani Ultimate Timeline. It can be configured to display critical review times as well as burn reviews with these markers.
image

1 Like

Thanks. I know lots of people use this one. I hadn’t tried it before. It is good. The white review markers don’t do quite the same thing as that other script but still useful.

Anyway I think I may have fixed my own problem by commenting out sections of the script through trial and error until it worked!

Anyone else having issues getting this script to run? It stopped working for me today.

1 Like

WK made some under-the-hood changes to the way the lesson screen works, which breaks several scripts. I have been working on a fix, but it’s not quite finished yet. For now, you can either test my fixed version:

or you can enable the script compatibility mode in the WK settings.

UPDATE: My pull requests for Keisei, Niai, and Rendaku information were all accepted, so the official installation link in the OP now again provides the most up-to-date version. To make sure that nobody accidentally installs the now outdated versions that were linked above, I changed the link targets to point to the official install locations. Please report any bugs – especially with the compatibility mode disabled – so that I can fix them before the WK team removes the compatibility mode.

11 Likes

The script stopped working for me completely, both in compatibility mode and without.

The browser console has this to say:

Syntax error @ "WaniKani Keisei Phonetic-Semantic Composition"!
##########################
JSHINT output:
##########################

F_a/s</<@eval:4:80
t@eval:3:191
E_u/<@eval:4:244
create/<@eval line 2 > Function:67:477
create@eval line 2 > Function:69:193
c@eval line 2 > Function:7:231
runListeners@eval line 2 > Function:7:202
anonymous/</</<@eval line 2 > Function:70:232
v@eval:13:204
eval line 2 > Function:69:14
SyntaxError: expected expression, got '.'

Please help, semantic-phonetic composition is an amazingly good tool for helping me learn.

What web browser are you using? And is it up-to-date, or are you using an older version? Maybe you can also tell me your OS and script manager.

The error message is not that helpful, but my guess is that your browser does not recognize the optional chaining operator (?.) I am using. According to this browser compatibility table (near the end of the page), it should work on all current web browsers, but it was only implemented last year, so maybe your browser does not support it yet?

1 Like

Yeah, I’m using an older version of firefox. That’s probably why then. Thanks for the help.
(I think firefox is getting worse in may ways with each release, so I am lagging way behind in updates)

For now you can downgrade to the version of Keisei that worked for you:

Install outdated version of Keisei

You probably also have to disable automatic updates for this script in your script manager. And then you need to activate the script compatibility mode that WK offers (I don’t know how long WK is going to support this mode).

I have to think about if/how I want to support older browsers.

1 Like

It’s very hard to keep supporting old versions. The ?. operator is going to be used more and more. For Harald, i think you’ll unfortunately have to concede at some point and either update or change to a new browser. It’s also about security updates and such, and compatibility of course.

What about using something along the lines of babel to compile out the dependency on newer versions?

Thanks, downgrading works (for now). I understand that you don’t want to support older browsers. I’ll have to consider updating my browser or maintaining a fork of the script. Or doing my wanikani stuff in a separate browser.

Why are you staying on an older version of Firefox anyway? Is there some feature they removed later that you can’t live without or something like that?

They started making it uglier and less useful every release. In an effort to look more like chrome or have consistent design on phones or something? But either way, the result is that every time I update I need to spend hours tinkering with config files to make the browser as useable as it was before.

2 Likes

Tell me about it. They seem to absolutely hate the tabs-not-on-top style. First they removed it from the preferences, but still included it in the hidden preferences. Then they removed it from the hidden preferences, but still allowed users to include it with style sheets. Then after every update slightly broke things such that a new workaround was required every single time, they eventually just removed the entire system.

I’ve given up, and decided to just get used to the default tab style, even though they’re too narrow, too indistinct, and they look weird above the address bar.

I think the latest update to lessons page

broke this wonderfull script. I do not see it on lessons pages anymore - I checked on kanji pages that it is there, for example for 苗.
Toggling compatibility mode on did not help.

2 Likes

Thanks for reporting this – I have already seen it, but I have not decided yet how I am going to fix this issue (I am currently trying to maintain this script). However, with compatibility mode activated, it still works for me. Can you check if the script compatibility mode is indeed set to “on” for you and try it one more time, just to make sure?

3 Likes

Just chiming in to say that the script still works for me with script compatibility on.

Also, thank you so much for maintaining this script! It’s truly an indispensable tool, and having it greatly enriches my learning.

4 Likes

Correct, with the compatibility mode it works.

Thanks for supporting this script, and for creating ConfusionGuesser!

1 Like

Thank you for this amazing script. I have a question about marking. What do the 3 colors mean? (red, green, yellow).

I don’t have the script, but from what I can gather it’s something like

Green - The kanji is a good match to the phonetic element

Yellow - the kanji used the phonetic element in question, but it’s not visually present in the modern kanji / the user has marked this item yellow manually for some other reason

Red - The kanji is not a good match to the phonetic element, probably because of sound shifts over time or other historical factors, like transcription errors.

Please anyone correct me if that’s incomplete or not accurate.