[Userscript] Open Framework: Visually Similar Kanji Filter

Is it not? I’m fetching it with $.get(), which I believe should default to cache?

Nope. This script was very hastily made and I never bothered to polish it.

The thing is I’m not happy with the interface of this script. It’s poorly designed and poorly executed. What you suggest makes sense, but I’m not sure I want to spend the time to fix this script right now, because I would want to redo most of it.

If you want to make any changes to the script yourself go ahead and I will merge it. I have all of my scripts on GitHub so it would be easy to make a pull request or if you prefer just post the changes here. I would eventually want to have another go at this script, but it’s very low priority for me right now

I am not familiar with $.get. I didn’t see code for caching so I assumed there was no cache. But you are right, it defaults to cache, so it is cached. Probably the network delays I saw are due to the fact I was loading for the first time.

Will do. These changes are easy and will be done quickly. I will rip off the old interface if you don’t mind. I think it doesn’t make sense to keep it once there is a search by search terms. There aren’t many existing users so I don’t risk upsetting someone.

My changes are now on github.

I got rid of the old user interface. Most of your code pertained to this interface. Therefore I ended up replacing the bulk of your code. I hope you don’t mind it turned out this way.

I have changed the label of the filter to LY Visually Similar. ‘LY’ stands for Lar Yencken. This is to distinguish from the search filter WK Visually Similar I wrote that searches WK visually similar data.

The new interface just takes search terms separated by commas in the search box. There is no dialog in the settings anymore.

I expect people to type with an IME. Both latin and Japanese commas are accepted.

People may start their search terms with a real number between 0 and 1 separated from the search terms with a comma. Then only matches that have a score in the database that is greater or equal to that number will be returned. This number is optional. The default is 0, which returns all visually similar kanjis.

Both comma and period are accepted as a decimal separator for internationalization.

Both latin and Japanese numerals are accepted to support IME input. The period and comma decimal separators may also be both latin and Japanese.

Explaining all this makes for a lengthy hover tip. I don’t see a way to shorten it without removing information the user needs to know.

This thread top post should now be rewritten to include all this.

There is a typo in Lars Yencken name in the top post. Yencken needs a c.

According to Lars Yencken site the data is available under the Creative Commons Attribution 3.0 Unported license. This license requires that a link to license be posted somewhere. I suggest you include it in the top post for compliance.

Lars Yencken visually similar data now displays nicely in Item Inspector version currently in development thanks to the filter. It works fine in exports too.

I investigated the cache because I still had network delays. I found that the github server where the file comes from instructs the browser to age the cache after 600 seconds. For this file this is worthless. I found no way to override the server directive at the browser. I tried to setup headers that request the server to setup a longer ageing time. These requests are rejected by the server. I gave up on $.get() for these reasons. I use wkof.load_file() and manually age the cache after one month.

you first have to create a list of kanji that you are having trouble with. You can do this by going to the script’s settings and typing some kanji into the input box at the top.

This tool looks great and would love to use it. I already installed the script on tamper monkey but i cant find the script settings or anything related to the filter :frowning:
Do I have to do something else after installing the script?
Thanks!!