Jitai (字体): The font randomizer that fits

They don’t actually appear to be async at all (though maybe they’re a Promise…in which case they would be essentially async). Regardless, perhaps the issue/solution I was experiencing was simply based on the way my browser handled these things.

Wanikani Open Framework - Settings module - Source code (greasyfork.org)
See line #345 for the wkof.Settings.save() method, which is function save_settings(context).

I assume you’re familiar with the similarities between async and Promise, but if not, then yeah, the then() of the Promise().then() is essentially doing the same thing as if you awaited it. Though it allows you to do so in a non-async method, so there are certain tradeoffs.

If it’s not to much effort, could you tell me where you got those fonts, and a screenshot of what you typed in the jitai script to make it recognize/use those fonts? Below is what I have rn copying the format of the v3 script.

Edit: I got it to work and add my new fonts! Just copy and paste the format already listed in the script, and replace it with the proper font file names. I changed the URL field to ‘local’ (since I downloaded the fonts), and they’re working! Initially, I had to click the use font button like 3 reviews in a row, but it actually saved and remembered my selected fonts now!

REMINDER, save your font list edits to a notepad (txt file) or something because when the script gets an update, it’ll erase your font list changes!

        // Fonts Added By Me (TESTING/COMMENTS CAUSE I'M A DUMMY WHO BREAKS STUFF)
        // "Pop-Rum-Cute" : {full_font_name: "PopRumCute", display_name: "Pop Rum Cute", url: 'local', recommended: false},
        // "BestTen-DOT" : {full_font_name: "BestTen-DOT", display_name: "Best Ten Regular", url: 'local', recommended: false},
        // "BestTen-CRT" : {full_font_name: "BestTen-CRT", display_name: "Best Ten Bold", url: 'local', recommended: false},
        // "DokiDokiFantasia" : {full_font_name: "DokiDokiFantasia", display_name: "Doki Doki Fantasia", url: 'local', recommended: false},
        // "Gakuran" : {full_font_name: "Gakuran", display_name: "Gakuran", url: 'local', recommended: false},
        // "HolidayMDJP" : {full_font_name: "HolidayMDJP", display_name: "Holiday MDJP", url: 'local', recommended: false},
        // "KouzanGyousho" : {full_font_name: "KouzanGyoushoOTF", display_name: "Kouzan Gyosho", url: 'local', recommended: false},
        // "Pigmo-01" : {full_font_name: "Pigmo-01", display_name: "Pigmo", url: 'local', recommended: false},
        // "ReggaeOne-Regular" : {full_font_name: "ReggaeOne-Regular", display_name: "Reggae One Regular", url: 'local', recommended: false},
        // "BestTen-DOT" : {full_font_name: "BestTen-DOT", display_name: "Best Ten Regular", url: 'local', recommended: false},
        // "Yokomoji" : {full_font_name: "yokomoji", display_name: "Yokomoji", url: 'local', recommended: false},
        // "851-Gochikakutto" : {full_font_name: "851Gkktt_005", display_name: "851 Gochikakutto", url: 'local', recommended: false},
        // "kirieji04" : {full_font_name: "kirieji04", display_name: "Kirieji", url: 'local', recommended: false},

I don’t know if it could cause trouble but font BestTen-DOT is listed twice.

Ah, thanks for pointing that out! I was copying and pasting that one, and then editing the line to fit whatever other font I added, so I probs pasted and forgot about it.

1 Like

Heya,
I used to use this ages ago but now coming back to wanikani I installed it again.
When I open my reviews I see the kanji in a different font than usual for a second, but then it comes back to the usual blocky wanikani style and I can’t seem to get it in any kind of different way. I scrolled through some of this thread but I don’t really understand some of the changes people suggest so I just now end up typing a question myself.
Anyone got good first tips to try out to fix this?
Thank you in advance :smiley:

I just started using it a few days ago, so things I kept note of:

  • Make sure you’re using v3 Jitai, the latest is 3.1, the original Jitai creator has abandoned it and Wanikani updates frequently break 3rd-party stuff (API & font changes) → Marciska’s post

  • Some stuff still wasn’t working, so MikeyDC65 made a pastebin that you can copy the whole thing and then replace the script in Tampermonkey with on the Jitai settings page → Mikey’s post

  • Make sure you have Wanikani Openframework → Made by rfindley

  • Make sure it’s enabled lol (Tampermonkey, Violentmonkey, whatever script manager you use). It also needs to be first in your script list for the other WK scripts work.

  • Not a pro, but at line 34 it says (let hovering = false;) which I think is what “disables” Jitai while in reviews. Basically, when you hover over the kanji in a review, it goes back to wanikani’s font. So it should be on ‘false’, not ‘true’

  • Make sure ad/script blockers aren’t causing any problems for the script, as mine (Ublock) caused a problem and I had to enable one of the filters on Wanikani

Once again, not a pro at all, but some of the things I did to fix it

4 Likes

I followed your instructions (downloaded 3.1 from the link you provided and replaced the code with the pastebin) and it’s still not working for some reason. I have WaniKani Open Framework set at #1 in Tampermonkey, with Jitai at #2. I’ve also tried it the other way around and it made no difference. Tried disabling uBlock on WaniKani, didn’t work either. And yes, the script is enabled and it shows it as having loaded.

I also tried disabling all my other scripts and leaving only WaniKani Open Framework and Jitai enabled, but that didn’t do it either. It just doesn’t work, at all.

EDIT: Got it working. Once again, it comes down to user error on my part. :sweat_smile: I had forgot one very crucial part which was to enable the fonts from the Jitai settings menu.

1 Like

Any idea why this might not be working for me? I have successfully installed other userscripts in the past. I see it is enabled and I checked off various fonts within the settings on the top left. I even downloaded the fonts to my PC so I am out of ideas. Any thoughts would be greatly appreciated!

UPDATE: I noticed after I do a review and get the word right/wrong, I see the new font if I hover over the word. But only after I submit an answer, not before.

1 Like

This plugin is broke again :frowning:

The script is also affected by the recent site updates (Wanikani Dashboard Update) and requires an update.

For now you should reload (circular icon next to URL) the review site (https://www.wanikani.com/subjects/review) after selecting it in the dashboard. Then all review-related scripts work again. See this thread for more information.

6 Likes

Ah thanks, I was wondering, because sometimes it did work, and I had no idea why, seems like the reloading was it. Hope someone knows how we can update the script, so that it loads automatically again.

did you ever figure this out? I have the same issue

yep, I was using an older version of the script - use the 3.1.2 version, but then make sure you read @Indekkusu post above - once you start reviews, refresh the page and then it will show up

1 Like

Apologies if this has question has already been answered - seems like it might have been, but I have tried scrolling through this thread and haven’t found a solution.

I’m fairly new to WaniKani and up until a few days ago was simply using the vanilla website. However, I decided to spend a bit of time browsing the forums and discovered the whole thing of scripts. Wow! So far, I have installed the Open Framework, Double-Check (great!) and Jitai. I really like the idea of randomising the fonts. However, I cannot get it to make any difference at all: I still get the same single font I always have.

Part of the problem might be that, after many years of using Linux, I recently switched to MacOS and I’m not very familiar with it, so the issue might lie there. However, I`ve tried using the fonts in Libre Office and they all show up there and look quite different - alarmingly so :slight_smile:

I’ve been using Firefox but because I couldn’t get Jitai to work on it, I thought I’d try Safari. Once again, I installed the Open Framework, Double-Check and Jitai, and once again D-C works perfectly and Jitai doesn’t seem to work at all. I have installed most of the fonts suggested on the GitHub page for Jitai, and there are a number of Japanese fonts pre-installed. To try to force these to be used, I have commented out all the fonts listed above the “Add your fonts here” section and listed 4 of the fonts I installed and 2 of the system fonts there, but nothing makes a difference.

Does anyone have any suggestion about how I might fix this?

I think a lot of scripts were broken by the removal of jquery - I’ve found that adding this line to the top section of scripts has been fixing a lot of them:

// @require http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js

(this should go before the // ==/UserScript== line and include the //)

Many thanks for your reply. I’ve applied the fix but it hasn’t resolved the issue. However, I think the problem is even more basic (my fault, but I didn’t notice this before): for whatever reason, the script is not running. I have 4 scripts currently installed. In order, they are Open Framework, Jitai, Double Check and Stroke Order. OF doesn’t do anything visible, but the other two are working fine. Tampermonkey shows all the scripts as Enabled. However, only 3 scripts are shown as running when WaniKani is open; obviously it’s Jitai that isn’t. Any thoughts as to why this might be?

I don’t know if this makes any difference to anything, but on the Tampermonkey control page I have put Open Framework in the number one spot in the list, but it comes up as number two in the list of running scripts.


I don’t think you’re using the most compatible version of Jitai. It can be a bit confusing, so I’ll just save the hassle and tell you to try this version.

I wouldn’t have been able to ascertain this had you not provided a screenshot of your installed scripts, so thank you for that!

Thanks for that. I have removed the old version and installed the new one, but nothing has changed. I’ve tried in both Safari and Firefox, and with and without the added jQuery line suggested in answer to my original query, but nothing happens. Haven’t attached screenshots as there is no change apart from updated Jitai version shown - the main problem seems to be the same, ie the script is not being run by Tampermonkey when WaniKani is loaded.

I managed to get it working following the instructions in @MikeyDC65 's post (Thank you so much!):

Would be nice if the OP was updated by a moderator with the new script and the additional info for getting it to work nowadays…

Brutal at first with the additional fonts, but I’m (slowly) getting the hang of them :grin: It’s a great addon!

1 Like

Thanks to all of you who have replied. It’s still not working. I have tried all the obvious things: switching the others off or on, reloading everything, etc. I’m trying it on Firefox and Safari, and it’s exactly the same on both. I’ve never used Safari before so there is nothing else running, nothing else that I have installed - it’s exactly as it comes ootb, with just Wanikani itself and some forum pages open: nothing else that might in some way interfere. Screenshots below in case they are any use. The last ones were of Safari where I only have 4 scripts installed. These from Firefox. Interestingly (ish!) the Tampermonkey info tab shows the scripts that are running and the ones that are disabled, but not Jitai - somehow it seems to be effectively invisible.

When I was starting with WaniKani, one of the pieces of advice I liked was “just get on with it, don’t waste learning time on mucking about”. I’m starting to feel that, nice though it would be to have varied fonts, I’m doing exactly what I’ve been counselled not to do, as well as using up other people’s time. If there is some really obvious thing that I’ve missed I’d be happy to try it; otherwise I repeat my thanks to those of you who have replied and I think I’ll move on for now.