[Userscript] Keisei 形声 Semantic-Phonetic Composition


#202

Fixed now in 1.7.8, there was a typo in a class name, and the non-compound grid worked a bit different than expected.

I also changed the layout for small screens a bit with the change to flexbox, it should finally look OK on phones as well.


#203

I wasn’t aware you could even use userscripts on mobile, how does that work?


#204

I haven’t really tried it on my own, but for Android there is Tampermonkey in the play store, and I believe Firefox mobile has extension support built in.

Apple forbids stuff like running code that doesn’t come from the App Store, but apps could include the script (it uses a few Tampermonkey extensions at the moment, though), you could build your own, see a bit above :slight_smile:


#205

@acm2010 can you help me?
I have no idea how it work
for instance can you describe this image? How it work, what it mean


Need clarify the phonetic-semantic - how to use
#206

Hi, I´m using your script on firefox, and if I start it after the browser opens, it works fine, but if I restart my browser (I have it set to always restore my last browsing session) it crashes all my scripts (but not the browser itself). I’ve tried disabling scripts, clearing the cache, and looking at the debug info but I can’t seem to find the problem. Any ideas?


#207

I think there is a bug in the script manager extension that completely stops it. Are you using Tampermonkey?

My guess is that one of the functions it provides to store files or settings fails under certain circumstances. I was never able reproduce it, someone would have to run Tampermonkey in a debugger to see what the problem is. You could try to set Tampermonkey’s logging level to debug and see if there are more clues.

After the scripts crash, do they work again after reload or closing a tab?

The only thing I could do is to rewrite all parts that use Tampermonkey specific functionality and switch to the WK open framework, but I am not totally certain that will fix the issue.


#208

No, they stay broken until I disable Keisei and restart firefox. I´m using tampermonkey. I´ve looked, and the console gives me this error

TypeError: r.$next_tip is undefined[Learn More] application-256bfaa1f8d87013b0517aedbadf8f3eed22cd095caf3d1b422e410bcd1864c2.js:5:298

pos_default https://cdn.wanikani.com/assets/default-v2/application-256bfaa1f8d87013b0517aedbadf8f3eed22cd095caf3d1b422e410bcd1864c2.js:5:298 init/</< https://cdn.wanikani.com/assets/default-v2/application-256bfaa1f8d87013b0517aedbadf8f3eed22cd095caf3d1b422e410bcd1864c2.js:4:29879 dispatch https://cdn.wanikani.com/assets/default-v2/application-256bfaa1f8d87013b0517aedbadf8f3eed22cd095caf3d1b422e410bcd1864c2.js:2:21544 add/g.handle https://cdn.wanikani.com/assets/default-v2/application-256bfaa1f8d87013b0517aedbadf8f3eed22cd095caf3d1b422e410bcd1864c2.js:2:18274


#209

That error looks like it’s coming from WK, it handles the displaying of a tooltip or something. I don’t think it is related, it will only prevent something from disappearing on screen.

If you have to restart Firefox then something more fundamental is breaking (something that should be untouchable by userscripts). Either a bug in Firefox or Tampermonkey.

Did this problem start recently? If you don’t use the session restore for WK, does it work without issues? Like closing WK before closing the browser, restarting, opening WK again?


#210

I finally fixed it! I did a factory reset of all my scripts, and it works fine now! Thanks!


#211


#212

@acm2010 Any reason 搾 doesn’t belong in the 乍 group?


#213

I’m always splitting the kanji into two parts, so 搾 is 手 + 窄. Then 窄 can be further divided into 穴 + 乍 (where it gets its reading from as well), so the on-reading comes from 乍 in a way, but the phonetic element is still 窄.

This actually happens quite frequently, but it is less obvious than in 搾, like 湧 = 水 + (勇 = 力 + 甬), so I think it better to treat the “compound phonetics” as they are, so everything is split in two parts only.

I added 窄 as a phonetic component, so now 乍 will now show up in the “more info fold” for 搾.


#214

Perhaps a foolish question, but what do you mean by factory reset?

From what you describe, I might be having a similar problem with the script with Firefox and TamperMonkey. At seemingly random times, all my scripts break - but everything fixes itself if I turn Keisei off and refresh.

So far, I got it to work most of the times by closing and restarting the browser, but this morning it kept not working (of course when I want to do lessons - where I need this script most. :joy:).

Do you mean you reinstalled things from scratch?


#215

It looks like 日 on top of 女 might be a phonetic component for えん. The following kanji all have the on’yomi えん:

I don’t see any other kanji on jisho with that same configuration for 日 and 女.


#216

Thanks, I added two components 妟 and 匽. I didn’t add them yet because they only have one compound in WK joyo/jinmeiyo, but jigen lists a few more (probably needs some more complete font to see :slight_smile:):

: , 𩷑
匽: , , , , , , 𧓱, ,


#217

Wow, that’s a lot! Two of those won’t even render on my phone. I can’t even find on’yomi readings listed on that website though.


#218

The site doesn’t list the Japanese readings for all kanji, it could be that the kanji were never really used in Japan so they didn’t get an on yomi, or the site just doesn’t have it.

It does list the reading in some Chinese dialect (no idea about the details :smile:), the lower part is about Middle Chinese (from the time the readings were imported to Japan).