├── imgs
├── howto.gif
├── jitai.ico
├── logo_small.png
└── logo.svg
├── .markdownlint.json
├── fonts
├── PopRumCute.css
├── Darts.css
├── FCFlower.css
├── HosoFuwa.css
├── ArmedBanana.css
├── NagayamaKai.css
└── SanChouMe.css
├── LICENSE
├── .github
└── workflows
│ └── publishFonts.yml
├── README.md
└── Jitai.user.js
/imgs/howto.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marciska/Jitai/HEAD/imgs/howto.gif
--------------------------------------------------------------------------------
/imgs/jitai.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marciska/Jitai/HEAD/imgs/jitai.ico
--------------------------------------------------------------------------------
/imgs/logo_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/marciska/Jitai/HEAD/imgs/logo_small.png
--------------------------------------------------------------------------------
/.markdownlint.json:
--------------------------------------------------------------------------------
1 | {
2 | "default": true,
3 | "MD013": false,
4 | "MD033": false,
5 | "MD041": false
6 | }
--------------------------------------------------------------------------------
/fonts/PopRumCute.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'PopRumCute';
3 | font-style: normal;
4 | font-weight: normal;
5 | src: local('PopRumCute'),
6 | url('https://moji-waku.com/poprumcute/font/poprum.woff') format('woff');
7 | }
--------------------------------------------------------------------------------
/fonts/Darts.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'darts font';
3 | font-style: normal;
4 | font-weight: normal;
5 | src: local('darts font'),
6 | url('https://raw.githubusercontent.com/davidsansome/tsurukame/master/www/fonts/darts-font.woff') format('woff');
7 | }
--------------------------------------------------------------------------------
/fonts/FCFlower.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'FC-Flower';
3 | font-style: normal;
4 | font-weight: normal;
5 | src: local('FC-Flower'),
6 | url('https://raw.githubusercontent.com/davidsansome/tsurukame/master/www/fonts/fc-flower.ttf') format('truetype');
7 | }
--------------------------------------------------------------------------------
/fonts/HosoFuwa.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'Hosofuwafont';
3 | font-style: normal;
4 | font-weight: normal;
5 | src: local('Hosofuwafont'),
6 | url('https://raw.githubusercontent.com/davidsansome/tsurukame/master/www/fonts/hoso-fuwa.ttf') format('truetype');
7 | }
--------------------------------------------------------------------------------
/fonts/ArmedBanana.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'ArmedBanana';
3 | font-style: normal;
4 | font-weight: normal;
5 | src: local('ArmedBanana'),
6 | url('https://raw.githubusercontent.com/davidsansome/tsurukame/master/www/fonts/armed-banana.ttf') format('truetype');
7 | }
--------------------------------------------------------------------------------
/fonts/NagayamaKai.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'nagayama_kai';
3 | font-style: normal;
4 | font-weight: normal;
5 | src: local('nagayama_kai'),
6 | url('https://raw.githubusercontent.com/davidsansome/tsurukame/master/www/fonts/nagayama-kai.otf') format('truetype');
7 | }
--------------------------------------------------------------------------------
/fonts/SanChouMe.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'santyoume-font';
3 | font-style: normal;
4 | font-weight: normal;
5 | src: local('santyoume-font'),
6 | url('https://raw.githubusercontent.com/davidsansome/tsurukame/master/www/fonts/san-chou-me.ttf') format('truetype');
7 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2016 Samuel R. Messner (@obskyr), 2023 Marco Omainska (@marciska)
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/.github/workflows/publishFonts.yml:
--------------------------------------------------------------------------------
1 | # A workflow to host fonts on github pages
2 |
3 | # the name of this workflow
4 | name: Publish Fonts
5 |
6 | # Controls when the workflow will run
7 | on:
8 | # Triggers the workflow on push or pull request events - but only for the "main" branch
9 | push:
10 | branches: [ "main" ]
11 | pull_request:
12 | branches: [ "main" ]
13 | # Allows you to run this workflow manually from the Actions tab
14 | workflow_dispatch:
15 |
16 | # inform github to permit this workflow to write on the repository branches
17 | permissions:
18 | contents: write
19 |
20 | # define the jobs
21 | jobs:
22 |
23 | # this workflow has only 1 job - and that is to publish the fonts (stylesheets)
24 | build-and-deploy:
25 | # ensure that only one workflow runs at a time
26 | concurrency:
27 | group: ${{ github.ref }}
28 | cancel-in-progress: true # cancel all pending ones and prioritize the newest
29 |
30 | # this job will run on ubuntu-latest, but technically we can also use other OS here
31 | runs-on: ubuntu-latest
32 |
33 | # to finish this job, we have to do some steps in successive order
34 | steps:
35 | # Check-out the repository under $GITHUB_WORKSPACE, so the job can access it
36 | - name: 🛎️ Setup Git repo
37 | uses: actions/checkout@v3
38 |
39 | # Deploy to Github Pages
40 | - name: 🚀 Deploy to GH-Pages
41 | uses: JamesIves/github-pages-deploy-action@v4
42 | with:
43 | folder: fonts # which folder shall be published
44 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | The font randomizer that fits
4 |
5 |
6 | **Jitai** (字体) is a userscript for [WaniKani](https://wanikani.com).
7 | It sets the font of the radical/kanji/vocabulary automatically to a random Japanese font.
8 | > [@obskyr](https://community.wanikani.com/t/jitai-字体-the-font-randomizer-that-fits/12617#jitai-logouploadskfps3jv5ojuckdedpacfc4qn4ppng-what-is-jitai-1): One thing that can become a bit of a problem when using WaniKani is that you are only ever exposed to one font. What this means is that if you ever run into a kanji in the wild, even if you know it, you might not recognize it. Especially with handwriting and calligraphy and all that jazz being around, it helps a lot to get in a bit of training on fonts that aren’t Meiryo.
9 |
10 | 
11 |
12 | ## Features
13 |
14 | - Supports fonts installed on your machine[^1]
15 | - **(NEW)** Supports webfonts
16 | - **(NEW)** New settings pannel to disable/enable fonts during review
17 | - Hover over a font to change it back to normal font (useful if you cannot read it sometimes)
18 |
19 | ## Installation
20 |
21 | First make sure you have a userscript manager like **Tampermonkey** installed.
22 | Then click on the link below, and your userscript manager should directly recognize it as a userscript to install:
23 | Download
24 |
25 | Questions? Visit the [forum][forum].
26 |
27 | ## Note
28 |
29 | Jitai has been originally created by [@obskyr][obskyr], but hasn't been maintained since 2018 and already broke functionality.
30 | This here is a complete rewrite of the original script, taking into account that some browsers do not support using local fonts in an attempt to prevent [Font Fingerprinting](https://browserleaks.com/fonts).
31 |
32 | We greatly accept font contributions and other improvements / bug fixes.
33 | If you like this project, you can visit the [forum][forum].
34 |
35 |
36 | [^1]: Browsers that support this feature are running out. [See more](https://community.wanikani.com/t/jitai-%E5%AD%97%E4%BD%93-the-font-randomizer-that-fits/12617/644).
37 |
38 |
39 | [obskyr]:https://github.com/obskyr
40 | [forum]:https://community.wanikani.com/t/jitai-字体-the-font-randomizer-that-fits/12617
41 |
--------------------------------------------------------------------------------
/imgs/logo.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Jitai.user.js:
--------------------------------------------------------------------------------
1 | // ==UserScript==
2 | // @name Jitai
3 | // @author @marciska
4 | // @namespace marciska
5 | // @description Displays your WaniKani reviews with randomized fonts (based on original by @obskyr, and community-maintained)
6 | // @version 3.3.6
7 | // @icon https://raw.github.com/marciska/Jitai/master/imgs/jitai.ico
8 | // @match https://www.wanikani.com/*
9 | // @match https://preview.wanikani.com/*
10 | // @license MIT; http://opensource.org/licenses/MIT
11 | // @run-at document-end
12 | // @grant none
13 | // ==/UserScript==
14 |
15 | (function(global) {
16 | 'use strict';
17 |
18 | /* eslint no-multi-spaces: off */
19 | /* global wkof, Stimulus */
20 |
21 | //===================================================================
22 | // Variables
23 | //-------------------------------------------------------------------
24 | const script_id = "jitai";
25 | const script_name = "Jitai";
26 | const wkof_version_needed = '1.2.6';
27 | const listenerOptions = { passive: true };
28 | const pageRegex = /^\/(subjects\/(?:review.*\/?|extra_study)$|recent-mistakes)/;
29 | const example_sentence = '質問:クモの味は何だと思う? 答え:・・・酸っぱいだ!(笑)';
30 |
31 | // ----- States -----
32 | let item_element;
33 | let style_element;
34 | let reroll_button_enabled = false;
35 | let setup_complete = false;
36 | let font_default; // will be set on review page load
37 | let font_randomized; // will be set dynamically, earliest on review page load
38 | let hover_flipped = false; // bool indicating if hovering effect is flipped
39 | let modifier_held = false; // bool indicating if a modifier key is being held down
40 |
41 | // available fonts
42 | let font_pool = {
43 | // Default OSX fonts
44 | "Hiragino-Kaku-Gothic-Pro" : {full_font_name: "Hiragino Kaku Gothic Pro, ヒラギノ角ゴ Pro W3", display_name: "Hiragino Kaku Gothic Pro", url: 'local', download: '', recommended: false, bugged: false},
45 | "Hiragino-Maru-Gothic-Pro" : {full_font_name: "Hiragino Maru Gothic Pro, ヒラギノ丸ゴ Pro W3", display_name: "Hiragino Maru Gothic Pro", url: 'local', download: '', recommended: false, bugged: false},
46 | "Hiragino-Mincho-Pro" : {full_font_name: "Hiragino Mincho Pro, ヒラギノ明朝 Pro W3", display_name: "Hiragino Mincho Pro", url: 'local', download: '', recommended: false, bugged: false},
47 | // Default Windows fonts
48 | "BIZ-UDGothic" : {full_font_name: "BIZ UDGothic, BIZ UDゴシック", display_name: "BIZ UDGothic", url: 'local', download: '', recommended: false, bugged: false},
49 | "BIZ-UDMincho" : {full_font_name: "BIZ UDMincho, BIZ UD明朝", display_name: "BIZ UDMincho", url: 'local', download: '', recommended: false, bugged: false},
50 | "BIZ-UDPGothic" : {full_font_name: "BIZ UDPGothic, BIZ UDPゴシック", display_name: "BIZ UDPGothic", url: 'local', download: '', recommended: false, bugged: false},
51 | "BIZ-UDPMincho" : {full_font_name: "BIZ UDPMincho, BIZ UDP明朝", display_name: "BIZ UDPMincho", url: 'local', download: '', recommended: false, bugged: false},
52 | "UDDigiKyokashoN-R" : {full_font_name: "UD Digi Kyokasho N-R, UD デジタル 教科書体 N-R", display_name: "UD Digi Kyokasho", url: 'local', download: '', recommended: false, bugged: false},
53 | "Meiryo" : {full_font_name: "Meiryo, メイリオ", display_name: "Meiryo", url: 'local', download: '', recommended: false, bugged: false},
54 | "MS-Gothic" : {full_font_name: "MS Gothic, MS ゴック", display_name: "MS Gothic", url: 'local', download: '', recommended: false, bugged: false},
55 | "MS-Mincho" : {full_font_name: "MS Mincho, MS 明朝", display_name: "MS Mincho", url: 'local', download: '', recommended: false, bugged: false},
56 | "MS-PGothic" : {full_font_name: "MS PGothic, MS Pゴシック", display_name: "MS PGothic", url: 'local', download: '', recommended: false, bugged: false},
57 | "MS-PMincho" : {full_font_name: "MS PMincho, MS P明朝", display_name: "MS PMincho", url: 'local', download: '', recommended: false, bugged: false},
58 | "Yu-Gothic" : {full_font_name: "Yu Gothic, 游ゴシック", display_name: "Yu Gothic", url: 'local', download: '', recommended: false, bugged: false},
59 | "Yu-Mincho" : {full_font_name: "Yu Mincho, 游明朝", display_name: "Yu Mincho", url: 'local', download: '', recommended: false, bugged: false},
60 | // GoogleFonts
61 | "Dela-Gothic-One" : {full_font_name: "Dela Gothic One", display_name: "Dela Gothic One", url: 'https://fonts.googleapis.com/css?family=Dela+Gothic+One&subset=japanese', download: 'https://fonts.google.com/specimen/Dela+Gothic+One', recommended: true, bugged: false},
62 | "DotGothic16" : {full_font_name: "DotGothic16", display_name: "DotGothic16", url: 'https://fonts.googleapis.com/css?family=DotGothic16&subset=japanese', download: 'https://fonts.google.com/specimen/DotGothic16', recommended: true, bugged: false},
63 | "Hachi-Maru-Pop" : {full_font_name: "Hachi Maru Pop", display_name: "Hachi Maru Pop", url: 'https://fonts.googleapis.com/css?family=Hachi+Maru+Pop&subset=japanese', download: 'https://fonts.google.com/specimen/Hachi+Maru+Pop', recommended: true, bugged: false},
64 | "Hina-Mincho" : {full_font_name: "Hina Mincho", display_name: "Hina Mincho", url: 'https://fonts.googleapis.com/css?family=Hina+Mincho&subset=japanese', download: 'https://fonts.google.com/specimen/Hina+Mincho', recommended: false, bugged: false},
65 | "Kaisei-Decol" : {full_font_name: "Kaisei Decol", display_name: "Kaisei Decol", url: 'https://fonts.googleapis.com/css?family=Kaisei+Decol&subset=japanese', download: 'https://fonts.google.com/specimen/Kaisei+Decol', recommended: false, bugged: false},
66 | "Kaisei-Opti" : {full_font_name: "Kaisei Opti", display_name: "Kaisei Opti", url: 'https://fonts.googleapis.com/css?family=Kaisei+Opti&subset=japanese', download: 'https://fonts.google.com/specimen/Kaisei+Opti', recommended: false, bugged: false},
67 | "Kaisei-Tokumin" : {full_font_name: "Kaisei Tokumin", display_name: "Kaisei Tokumin", url: 'https://fonts.googleapis.com/css?family=Kaisei+Tokumin&subset=japanese', download: 'https://fonts.google.com/specimen/Kaisei+Tokumin', recommended: false, bugged: false},
68 | "Kiwi-Maru" : {full_font_name: "Kiwi Maru", display_name: "Kiwi Maru", url: 'https://fonts.googleapis.com/css?family=Kiwi+Maru&subset=japanese', download: 'https://fonts.google.com/specimen/Kiwi+Maru', recommended: false, bugged: false},
69 | "Klee-One" : {full_font_name: "Klee One", display_name: "Klee One", url: 'https://fonts.googleapis.com/css?family=Klee+One&subset=japanese', download: 'https://fonts.google.com/specimen/Klee+One', recommended: false, bugged: false},
70 | "Kosugi-Maru" : {full_font_name: "Kosugi Maru", display_name: "Kosugi Maru", url: 'https://fonts.googleapis.com/css?family=Kosugi+Maru&subset=japanese', download: 'https://fonts.google.com/specimen/Kosugi+Maru', recommended: false, bugged: false},
71 | "LXGW-WenKai-TC" : {full_font_name: "LXGW WenKai TC", display_name: "LXGW WenKai TC", url: 'https://fonts.googleapis.com/css?family=LXGW+WenKai+TC&subset=japanese', download: 'https://fonts.google.com/specimen/LXGW+WenKai+TC', recommended: false, bugged: false},
72 | "Mochiy-Pop-One" : {full_font_name: "Mochiy Pop One", display_name: "Mochi Pop One", url: 'https://fonts.googleapis.com/css?family=Mochiy+Pop+One&subset=japanese', download: 'https://fonts.google.com/specimen/Mochiy+Pop+One', recommended: false, bugged: false},
73 | "New-Tegomin" : {full_font_name: "New Tegomin", display_name: "New Tegomin", url: 'https://fonts.googleapis.com/css?family=New+Tegomin&subset=japanese', download: 'https://fonts.google.com/specimen/New+Tegomin', recommended: false, bugged: false},
74 | "Potta-One" : {full_font_name: "Potta One", display_name: "Potta One", url: 'https://fonts.googleapis.com/css?family=Potta+One&subset=japanese', download: 'https://fonts.google.com/specimen/Potta+One', recommended: false, bugged: false},
75 | "Rampart-One" : {full_font_name: "Rampart One", display_name: "Rampart One", url: 'https://fonts.googleapis.com/css?family=Rampart+One&subset=japanese', download: 'https://fonts.google.com/specimen/Rampart+One', recommended: false, bugged: false},
76 | "Reggae-One" : {full_font_name: "Reggae One", display_name: "Reggae One", url: 'https://fonts.googleapis.com/css?family=Reggae+One&subset=japanese', download: 'https://fonts.google.com/specimen/Reggae+One', recommended: false, bugged: false},
77 | "RocknRoll-One" : {full_font_name: "RocknRoll One", display_name: "RocknRoll One", url: 'https://fonts.googleapis.com/css?family=RocknRoll+One&subset=japanese', download: 'https://fonts.google.com/specimen/RocknRoll+One', recommended: false, bugged: false},
78 | "Shippori-Mincho" : {full_font_name: "Shippori Mincho", display_name: "Shippori Mincho", url: 'https://fonts.googleapis.com/css?family=Shippori+Mincho&subset=japanese', download: 'https://fonts.google.com/specimen/Shippori+Mincho', recommended: false, bugged: false},
79 | "Stick" : {full_font_name: "Stick", display_name: "Stick", url: 'https://fonts.googleapis.com/css?family=Stick&subset=japanese', download: 'https://fonts.google.com/specimen/Stick', recommended: true, bugged: false},
80 | "Train-One" : {full_font_name: "Train One", display_name: "Train One", url: 'https://fonts.googleapis.com/css?family=Train+One&subset=japanese', download: 'https://fonts.google.com/specimen/Train+One', recommended: false, bugged: false},
81 | "Yomogi" : {full_font_name: "Yomogi", display_name: "Yomogi", url: 'https://fonts.googleapis.com/css?family=Yomogi&subset=japanese', download: 'https://fonts.google.com/specimen/Yomogi', recommended: false, bugged: false},
82 | "Yuji-Boku" : {full_font_name: "Yuji Boku", display_name: "Yuji Boku", url: 'https://fonts.googleapis.com/css?family=Yuji+Boku&subset=japanese', download: 'https://fonts.google.com/specimen/Yuji+Boku', recommended: false, bugged: false},
83 | "Yuji-Mai" : {full_font_name: "Yuji Mai", display_name: "Yuji Mai", url: 'https://fonts.googleapis.com/css?family=Yuji+Mai&subset=japanese', download: 'https://fonts.google.com/specimen/Yuji+Mai', recommended: false, bugged: false},
84 | "Yuji-Syuku" : {full_font_name: "Yuji Syuku", display_name: "Yuji Syuku", url: 'https://fonts.googleapis.com/css?family=Yuji+Syuku&subset=japanese', download: 'https://fonts.google.com/specimen/Yuji+Syuku', recommended: false, bugged: false},
85 | "Yusei-Magic" : {full_font_name: "Yusei Magic", display_name: "Yusei Magic", url: 'https://fonts.googleapis.com/css?family=Yusei+Magic&subset=japanese', download: 'https://fonts.google.com/specimen/Yusei+MagicYusei+Magic', recommended: false, bugged: false},
86 | "Zen-Antique" : {full_font_name: "Zen Antique", display_name: "Zen Antique", url: 'https://fonts.googleapis.com/css?family=Zen+Antique&subset=japanese', download: 'https://fonts.google.com/specimen/Zen+Antique', recommended: false, bugged: false},
87 | "Zen-Kurenaido" : {full_font_name: "Zen Kurenaido", display_name: "Zen Kurenaido", url: 'https://fonts.googleapis.com/css?family=Zen+Kurenaido&subset=japanese', download: 'https://fonts.google.com/specimen/Zen+Kurenaido', recommended: false, bugged: false},
88 | "Zen-Maru-Gothic" : {full_font_name: "Zen Maru Gothic", display_name: "Zen Maru Gothic", url: 'https://fonts.googleapis.com/css?family=Zen+Maru+Gothic&subset=japanese', download: 'https://fonts.google.com/specimen/Zen+Maru+Gothic', recommended: false, bugged: false},
89 | "Zen-Old-Mincho" : {full_font_name: "Zen Old Mincho", display_name: "Zen Old Mincho", url: 'https://fonts.googleapis.com/css?family=Zen+Old+Mincho&subset=japanese', download: 'https://fonts.google.com/specimen/Zen+Old+Mincho', recommended: false, bugged: false},
90 | // AdobeFonts
91 | "AB-Appare" : {full_font_name: "ab-appare", display_name: "AB Appare", url: 'adobe', download: 'https://fonts.adobe.com/foundries/tegakiya-honpo', recommended: false, bugged: false},
92 | "AB-Shinyubipenjigyosyotai" : {full_font_name: "ab-shinyubipenjigyosyotai", display_name: "AB Shinyubipenjigyosyotai", url: 'adobe', download: 'https://fonts.adobe.com/foundries/tegakiya-honpo', recommended: true, bugged: false},
93 | "Hakusyu-Sosho" : {full_font_name: "hot-soshokk, HakusyuSosho", display_name: "Hakusyu Sosho", url: 'adobe', download: 'https://www.hakusyu.com/download_education.htm', recommended: false, bugged: false},
94 | "Hakusyu-Tensho" : {full_font_name: "hot-tenshokk, HakusyuTensho", display_name: "Hakusyu Tensho", url: 'adobe', download: 'https://www.hakusyu.com/download_education.htm', recommended: false, bugged: false},
95 | // Other popular fonts
96 | "3D-Kirieji" : {full_font_name: "'3Dkirieji04', 三次元切絵字04", display_name: "3D Kirieji", url: 'local', download: 'https://fub.booth.pm/items/2451491', recommended: false, bugged: false},
97 | "851CHIKARA-YOWAKU" : {full_font_name: "'851CHIKARA-YOWAKU', '851チカラヨワク'", display_name: "851 Chikara Yowaku", url: 'local', download: 'https://pm85122.onamae.jp/851ch-yw.html', recommended: false, bugged: false},
98 | "851Gkktt" : {full_font_name: "'851Gkktt', '851ゴチカクット'", display_name: "851 Gochikakutto", url: 'local', download: 'https://pm85122.onamae.jp/851Gkktt.html', recommended: false, bugged: false},
99 | "851MkPOP" : {full_font_name: "'851MkPOP', '851マカポップ'", display_name: "851 Mk POP", url: 'local', download: 'https://pm85122.onamae.jp/851mkpop.html', recommended: false, bugged: false},
100 | "851-Tegaki-Zatsu" : {full_font_name: "'851tegakizatsu', '851手書き雑フォント'", display_name: "851 Tegaki Zatsu", url: 'local', download: 'https://fontmeme.com/fonts/851-tegaki-zatsu-font/', recommended: false, bugged: false},
101 | "851-Tegaki-Kakutto" : {full_font_name: "'851H-kktt', '851テガキカクット'", display_name: "851 Tegaki Kakutto", url: 'local', download: 'https://pm85122.onamae.jp/851H_kktt.html', recommended: false, bugged: false},
102 | "AnkokuZombic" : {full_font_name: "AnkokuZombic, 暗黒ゾン字, 䅮歯歵婯浢楣", display_name: "Ankoku Zombic", url: 'local', download: 'http://www.ankokukoubou.com/font/ankokuzonji.htm', recommended: false, bugged: false},
103 | "Aoyagi-Gyousho" : {full_font_name: "KouzanBrushFontGyousyo, 衡山毛筆フォント行書, 䭯畺慮䉲畳框潮瑇祯畳祯, Aoyagi Gyousyo, Aoyagi Gyousho", display_name: "Aoyagi Gyousho", url: 'local', download: 'https://opentype.jp/kouzangyousho.htm', recommended: false, bugged: false},
104 | "Aoyagi-Kouzan" : {full_font_name: "AoyagiKouzanFont2OTF, 青柳衡山フォント2 OTF", display_name: "Aoyagi Kouzan", url: 'local', download: 'https://jref.com/resources/aoyagi-kouzan.90/', recommended: true, bugged: false},
105 | "Aoyagi-Reisho" : {full_font_name: "Aoyagi Reisho, Aoyagi Reisyo, aoyagireisyo2, aoyagireisyosimo2, 青柳隷書SIMO2_T", display_name: "Aoyagi Reisho", url: 'local', download: 'https://opentype.jp/aoyagireisho.htm', recommended: false, bugged: false},
106 | "Aoyagi-Soseki-2" : {full_font_name: "AoyagiSosekiFont2OTF, 青柳疎石フォント2 OTF", display_name: "Aoyagi Soseki 2", url: 'local', download: 'https://www.freekanjifonts.com/wp-content/uploads/AoyagiSosekiFontOTF.zip', recommended: false, bugged: false},
107 | "Aquafont" : {full_font_name: "Aquafont, aquafont, あくあフォント, 芠芭芠荴荈莓荧", display_name: "Aquafont", url: 'local', download: 'https://www.freejapanesefont.com/aqua-font/', recommended: false, bugged: false},
108 | "Asobi-Memogaki" : {full_font_name: "AsobiMemogaki, 遊びメモ書き, 靖苑莁莂辑芫", display_name: "Asobi Memogaki", url: 'local', download: 'https://font.sumomo.ne.jp/asobi.html', recommended: false, bugged: false},
109 | "ArmedBanana" : {full_font_name: "ArmedBanana, アームドバナナ", display_name: "Armed Banana", url: 'https://marciska.github.io/Jitai/ArmedBanana.css', download: 'http://calligra-tei.oops.jp/download.html', recommended: true, bugged: false},
110 | "ArmedLemon" : {full_font_name: "ArmedLemon, アームドレモン, 荁腛莀荨莌莂莓", display_name: "Armed Lemon", url: 'local', download: 'http://calligra-tei.oops.jp/download.html', recommended: false, bugged: false},
111 | "Chifont" : {full_font_name: "'chifont+', 'ちはやフォント+'", display_name: "Chifont", url: 'local', download: 'https://welina.xyz/font/tegaki/nchif/', recommended: false, bugged: false},
112 | "Chihaya-Gothic" : {full_font_name: "ChihayaGothic, ちはやゴシック, 芿苍苢荓荖荢荎", display_name: "Chihaya Gothic", url: 'local', download: 'https://welina.xyz/font/tegaki/gothic/', recommended: false, bugged: false},
113 | "Cinecaption" : {full_font_name: "cinecaption, しねきゃぷしょん, 芵苋芫苡苕芵若英", display_name: "Cinecaption", url: 'local', download: 'https://cooltext.com/Download-Font-しねきゃぷしょん+cinecaption', recommended: false, bugged: false},
114 | "Darts" : {full_font_name: "DartsFont, darts font, ダーツフォント, 荟腛荣荴荈莓荧", display_name: "Darts", url: 'https://marciska.github.io/Jitai/Darts.css', download: 'https://www.p-darts.jp/font/dartsfont/', recommended: false, bugged: false},
115 | "DF-POPCorn" : {full_font_name: "DFPOPCorn-W12, DFPOPコンW12, 艣艥偏傃劃鍗ㄲ", display_name: "DF POPCorn", url: 'local', download: 'https://japanesefonts.org/dfpopcorn.html', recommended: false, bugged: false},
116 | "Ebihara-No-Kuseji" : {full_font_name: "EbiharaNoKuseji", display_name: "Ebihara No Kuseji", url: 'local', download: 'https://naotoebihara.booth.pm/items/3965615', recommended: false, bugged: false},
117 | "EPSON-行書体M" : {full_font_name: "EPSON 行書体M, 䕐协丠赳辑里艬", display_name: "EPSON 行書体M", url: 'local', download: 'https://www.epson.jp/dl_soft/readme/27767.htm', recommended: false, bugged: false},
118 | "EPSON-正楷書体M" : {full_font_name: "EPSON 正楷書体M, 䕐协丠邳麲辑里艬", display_name: "EPSON 正楷書体M", url: 'local', download: 'https://www.epson.jp/dl_soft/readme/27767.htm', recommended: false, bugged: false},
119 | "EPSON-教科書体M" : {full_font_name: "EPSON 教科書体M, 䕐协丠讳览辑里艬", display_name: "EPSON 教科書体M", url: 'local', download: 'https://www.epson.jp/dl_soft/readme/27767.htm', recommended: false, bugged: false},
120 | "EPSON-太明朝体B" : {full_font_name: "EPSON 太明朝体B, 䕐协丠醾难銩里艡", display_name: "EPSON 太明朝体B", url: 'local', download: 'https://www.epson.jp/dl_soft/readme/27767.htm', recommended: false, bugged: false},
121 | "EPSON-太行書体B" : {full_font_name: "EPSON 太行書体B, 䕐协丠醾赳辑里艡", display_name: "EPSON 太行書体B", url: 'local', download: 'https://www.epson.jp/dl_soft/readme/27767.htm', recommended: false, bugged: false},
122 | "EPSON 太丸ゴシック体B" : {full_font_name: "EPSON 太丸ゴシック体B, 䕐协丠醾諛荓荖荢荎里艡", display_name: "EPSON 太丸ゴシック体B", url: 'local', download: 'https://www.epson.jp/dl_soft/readme/27767.htm', recommended: false, bugged: false},
123 | "EPSON 太角ゴシック体B" : {full_font_name: "EPSON 太角ゴシック体B, 䕐协丠醾詰荓荖荢荎里艡", display_name: "EPSON 太角ゴシック体B", url: 'local', download: 'https://www.epson.jp/dl_soft/readme/27767.htm', recommended: false, bugged: false},
124 | "EPSON-丸ゴシック体M" : {full_font_name: "EPSON 丸ゴシック体M, 䕐协丠諛荓荖荢荎里艬", display_name: "EPSON 丸ゴシック体M", url: 'local', download: 'https://www.epson.jp/dl_soft/readme/27767.htm', recommended: false, bugged: false},
125 | "FC-Flower" : {full_font_name: "FC-Flower", display_name: "FC-Flower", url: 'https://marciska.github.io/Jitai/FCFlower.css', download: 'https://web.archive.org/web/20200718072012/http://fscolor.happy.nu/font/fl.html', recommended: false, bugged: true},
126 | "FUTENE" : {full_font_name: "FUTENE", display_name: "FUTENE", url: 'local', download: 'https://booth.pm/en/items/2818671', recommended: false, bugged: false},
127 | "Futo-Min-A101-Pro" : {full_font_name: "A-OTF Futo Min A101 Pro, A-OTF 太ミンA101 Pro, A-OTF Futo Min A101 Pro Bold, A-OTF 太ミンA101 Pro Bold, 䄭佔䘠醾荾莓䄱〱⁐牯", display_name: "Futo Min A101 Pro", url: 'local', download: 'https://japanesefonts.org/futomina101pro-bold.html', recommended: false, bugged: false},
128 | "gatasosyo" : {full_font_name: "gatasosyo, があた草書", display_name: "Gatasosyo", url: 'local', download: 'https://booth.pm/ja/items/318557/', recommended: false, bugged: false},
129 | "GN-KMBFont-UB-NewstyleKanaA" : {full_font_name: "GN-KMBFont-UB-NewstyleKanaA, GN-キルゴUかなNA, 䝎ⶃ䲃讃单芩苈乁", display_name: "GN KMBFont UB NewstyleKanaA", url: 'local', download: 'https://fontmeme.com/jfont/kill-gothic-u-font/', recommended: false, bugged: false},
130 | "GN-KMBFont-UB-NewstyleKanaB" : {full_font_name: "GN-KMBFont-UB-NewstyleKanaB, GN-キルゴUかなNB, 䝎ⶃ䲃讃单芩苈乂", display_name: "GN KMBFont UB NewstyleKanaB", url: 'local', download: 'https://fontmeme.com/jfont/kill-gothic-u-font/', recommended: false, bugged: false},
131 | "GN-KMBFont-UB-OldstyleKana" : {full_font_name: "GN-KMBFont-UB-OldstyleKana, GN-キルゴUかなO", display_name: "GN KMBFont UB OldstyleKana", url: 'local', download: 'https://fontmeme.com/jfont/kill-gothic-u-font/', recommended: false, bugged: false},
132 | "GoJuOn" : {full_font_name: "GoJuOn, 醐銃怨, 賭轥覅", display_name: "GoJuOn", url: 'local', download: 'https://jref.com/resources/gojuon.22/', recommended: false, bugged: true},
133 | "Hakusyu-Higerei" : {full_font_name: "HakusyuHigerei, 白舟髭隷, 钒轍镅韪", display_name: "Hakusyu Higerei", url: 'local', download: 'https://www.freekanjifonts.com/wp-content/uploads/hkhigerei.zip', recommended: false, bugged: true},
134 | "Hakusyu-Kaisho-Bold" : {full_font_name: "HakusyuKaisyoExtraBold_kk", display_name: "Hakusyu Kaisho Bold", url: 'local', download: 'https://www.hakusyu.com/download_education.htm', recommended: false, bugged: false},
135 | "HGSGyoshotai" : {full_font_name: "HGSGyoshotai, 䡇升祯", display_name: "HGS Gyoshotai", url: 'local', download: 'https://japanesefonts.org/hg-gyoshotai.html', recommended: false, bugged: false},
136 | "HGSHakushuGyososhotai" : {full_font_name: "HGSHakushuGyososhotai, 䡇午慫畳桵", display_name: "HGS Hakushu Gyososhotai", url: 'local', download: 'https://japanesefonts.org/hg-hakushu-gyoshotai.html', recommended: false, bugged: false},
137 | "HGSSyounanGyoshotai" : {full_font_name: "HGSSyounanGyoshotai", display_name: "HGS Syounan Gyoshotai", url: 'local', download: 'https://japanesefonts.org/hg-syounan-gyoshotai.html', recommended: false, bugged: false},
138 | "HG-Seikaishotai-PRO" : {full_font_name: "HGSeikaishotaiPRO, HG正楷書体-PRO", display_name: "HG Seikaishotai PRO", url: 'local', download: 'https://jref.com/resources/hg-seikaishotaipro.26/', recommended: false, bugged: false},
139 | "Hoso-Fuwa" : {full_font_name: "Hosofuwafont, ほそふわフォント, 苙芻苓苭荴荈莓荧", display_name: "Hoso Fuwa", url: 'https://marciska.github.io/Jitai/HosoFuwa.css', download: 'https://huwahuwa.ff-design.net/ほそふわフォント/', recommended: false, bugged: false},
140 | "Hui" : {full_font_name: "HuiFont, ふい字", display_name: "Hui", url: 'local', download: 'https://www.vector.co.jp/soft/dl/data/writing/se337659.html', recommended: false, bugged: false},
141 | "Kaiso-Next-B" : {full_font_name: "Kaiso, 廻想体, Kaiso-Next-B, 廻想体 ネクスト B, 觴酺里", display_name: "Kaiso Next B", url: 'local', download: 'https://moji-waku.com/kaiso/', recommended: false, bugged: false},
142 | "Kawaii-Tegaki" : {full_font_name: "KAWAIITEGAKIMOJI, kawaii手書き文字, 䭁坁䥉呅䝁䭉䵏䩉", display_name: "Kawaii Tegaki", url: 'local', download: 'https://font.spicy-sweet.com/', recommended: false, bugged: false},
143 | "Kirieji" : {full_font_name: "kirieji04, 切絵字04", display_name: "Kirieji", url: 'local', download: 'https://fub.booth.pm/items/2449888', recommended: false, bugged: false},
144 | "Kouichi-SakuraiFontFeltPen" : {full_font_name: "'kouichi.sakurai font felt pen', 櫻井幸一フォント フェルトペン", display_name: "Kouichi Sakurai Font Felt Pen", url: 'local', download: 'http://fontlab.web.fc2.com/kohichi-feltpen.html', recommended: false, bugged: false},
145 | "Kouzan-Brush" : {full_font_name: "KouzanBrushFont, 衡山毛筆フォント", display_name: "Kouzan Brush", url: 'local', download: 'https://jref.com/resources/kouzanmohitsu.143/', recommended: false, bugged: false},
146 | "Kouzan-Brush-OTF" : {full_font_name: "KouzanBrushFontOTF, 衡山毛筆フォント OTF, '赴蹒雑镍荴荈莓荧⁏呆'", display_name: "Kouzan Brush OTF", url: 'local', download: 'https://www.freekanjifonts.com/wp-content/uploads/KouzanMouhituFontOTF.zip', recommended: false, bugged: false},
147 | "LINE-Seed-JP" : {full_font_name: "LINESeedJP_OTF_Rg, LINE Seed JP_OTF, LINE Seed JP_OTF Regular, 䱉久⁓敥搠䩐彏呆⁒敧畬慲", display_name: "LINE Seed JP", url: 'local', download: 'https://seed.line.me/index_jp.html', recommended: false, bugged: false},
148 | "Makiba" : {full_font_name: "MakibaFont, まきばフォント, 䵡歩扡䙯湴", display_name: "Makiba", url: 'local', download: 'https://www.vector.co.jp/soft/dl/data/writing/se376386.html', recommended: false, bugged: false},
149 | "Maru-Folk-Pro" : {full_font_name: "A-OTF Maru Folk Pro, A-OTF 丸フォーク Pro, A-OTF Maru Folk Pro R, A-OTF 丸フォーク Pro R, 䄭佔䘠諛荴荈腛荎⁐牯", display_name: "Maru Folk Pro", url: 'local', download: 'https://fontsgeek.com/a-otf-maru-folk-pro-font', recommended: false, bugged: false},
150 | "Midashi-Min-MA31-Pro" : {full_font_name: "A-OTF Midashi Min MA31 Pro, A-OTF 見出ミンMA31 Pro, A-OTF Midashi Min MA31 Pro MA31, A-OTF 見出ミンMA31 Pro MA31, 䄭佔䘠販软荾莓䵁㌱⁐牯", display_name: "Midashi Min MA31 Pro", url: 'local', download: 'https://fontsgeek.com/a-otf-midashi-min-ma31-pro-font', recommended: false, bugged: false},
151 | "Mikiyu-Mokomor-kuro" : {full_font_name: "Mikiyu Font Mokomor-kuro, みきゆフォント もこもり黒β, 䵩歩祵⁆潮琠䵯歯浯爭歵牯", display_name: "Mikiyu Mokomor-kuro", url: 'local', download: 'https://sozaiya405.chu.jp/405/font.htm#%E3%82%82%E3%81%93%E3%82%82%E3%82%8A%E9%BB%92', recommended: false, bugged: true},
152 | "Mikiyu-PENJI-P" : {full_font_name: "Mikiyu Font -PENJI- P, みきゆFONT ペン字 P", display_name: "Mikiyu PENJI P", url: 'local', download: 'https://japanesefonts.org/mikiyu-penji-p.html', recommended: false, bugged: false},
153 | "Mitsu" : {full_font_name: "MitsuFont, みつフォント", display_name: "Mitsu", url: 'local', download: 'https://www.vector.co.jp/soft/dl/data/writing/se502611.html', recommended: false, bugged: false},
154 | "Mitsu-2" : {full_font_name: "mitsufont2, みつフォント2, 浩瑳畦潮琲", display_name: "Mitsu 2", url: 'local', download: 'https://www.vector.co.jp/soft/dl/data/writing/se502613.html', recommended: false, bugged: false},
155 | "Mofuji" : {full_font_name: "mofuji04, モフ字04, 浯晵橩〴", display_name: "Mofuji", url: 'local', download: 'https://fub.booth.pm/items/2449861', recommended: false, bugged: false},
156 | "Moon-PRO" : {full_font_name: "moon font-PRO, S2GPつきフォント, 匲䝐苂芫荴荈莓荧", display_name: "Moon PRO", url: 'local', download: 'https://japanesefonts.org/moon-font-pro.html', recommended: false, bugged: false},
157 | "MT-TARE" : {full_font_name: "MT_TARE, MT たれ", display_name: "MT TARE", url: 'local', download: 'https://japanesefonts.org/mt_tare.html', recommended: false, bugged: false},
158 | "Mushin" : {full_font_name: "Mushin, 無心, 隳道", display_name: "Mushin", url: 'local', download: 'https://modi.jpn.org/font_mushin.php', recommended: false, bugged: false},
159 | "Nagayama-Kai" : {full_font_name: "Nagayama Kai, nagayama_kai, 湡条祡浡彫慩", display_name: "Nagayama Kai", url: 'https://marciska.github.io/Jitai/NagayamaKai.css', download: 'https://www.bokushin.org/en/nagayama-sensei-font/', recommended: false, bugged: false},
160 | "NChifont" : {full_font_name: "'Nchifont+', 'Nちはやフォント+'", display_name: "NChifont+", url: 'local', download: 'https://welina.xyz/font/tegaki/nchif/', recommended: false, bugged: false},
161 | "Ohisama" : {full_font_name: "OhisamaFont, おひさまフォント", display_name: "Ohisama", url: 'local', download: 'https://www.vector.co.jp/soft/dl/data/writing/se437981.html', recommended: false, bugged: false},
162 | "Onryou" : {full_font_name: "onryou, 怨霊, 潮特潵", display_name: "Onryou", url: 'local', download: 'http://www.ankokukoubou.com/font/onryou.htm', recommended: false, bugged: false},
163 | "Pop-Rum-Cute" : {full_font_name: "PopRumCute, ポプらむ☆キュート, 荼荶苧苞膙荌莅腛荧", display_name: "Pop Rum Cute", url: 'https://marciska.github.io/Jitai/PopRumCute.css', download: 'https://moji-waku.com/poprumcute/', recommended: false, bugged: false},
164 | "PS-NOW-GU" : {full_font_name: "PS-NOW-GU, RFナウ-GU", display_name: "PS NOW GU", url: 'local', download: 'https://japanesefonts.org/ps-now-gu.html', recommended: false, bugged: false},
165 | "Reiko" : {full_font_name: "reikofont, れいこフォント, 苪芢花荴荈莓荧", display_name: "Reiko", url: 'local', download: 'https://japanesefonts.org/reikofont.html', recommended: false, bugged: false},
166 | "Ronde-B-Square" : {full_font_name: "Ronde B Square, Ronde-B, ロンド B, Ronde-B-Square, ロンド B スクエア, 莍莓荨⁂", display_name: "Ronde B square", url: 'local', download: 'https://moji-waku.com/ronde/', recommended: false, bugged: false},
167 | "S2G-memo" : {full_font_name: "S2Gmemo, S2Gメモ", display_name: "S2G Memo", url: 'local', download: 'https://jref.com/resources/s2g-memo.95/', recommended: false, bugged: false},
168 | "Samurai" : {full_font_name: "Samurai, さむらい, 芳苞苧芢", display_name: "Samurai", url: 'local', download: 'https://japanesefonts.org/samurai.html', recommended: false, bugged: false},
169 | "Sanafon-Kazari" : {full_font_name: "'SanafonKazariV2.66', 'さなフォン飾V2.66'", display_name: "Sanafon Kazari", url: 'local', download: 'https://jref.com/resources/sanafonkazari.102/', recommended: false, bugged: false},
170 | "San-Chou-Me" : {full_font_name: "San Chou Me, santyoume-font, 三丁目フォント, 獡湴祯畭攭景湴", display_name: "San Chou Me", url: 'https://marciska.github.io/Jitai/SanChouMe.css', download: 'https://web.archive.org/web/20190330133455/http://www.geocities.jp/bokurano_yume/', recommended: false, bugged: false},
171 | "Saruji" : {full_font_name: "saruji, さるじ, 獡牵橩", display_name: "Saruji", url: 'local', download: 'https://note.com/chitosekato/n/nc162552f8c1f', recommended: false, bugged: false},
172 | "Sea-Pro" : {full_font_name: "Sea font-pro, S2GP海フォント, 匲䝐詃荴荈莓荧", display_name: "Sea Pro", url: 'local', download: 'https://jref.com/resources/sea-pro.111/', recommended: false, bugged: false},
173 | "Shigoto-Memogaki" : {full_font_name: "ShigotoMemogaki, 仕事メモ書き, 蹤躖莁莂辑芫", display_name: "Shigoto Memogaki", url: 'local', download: 'https://font.sumomo.ne.jp/shigoto.html', recommended: false, bugged: false},
174 | "Shin-Maru-Go-Pro" : {full_font_name: "A-OTF Shin Maru Go Pro, A-OTF 新丸ゴ Pro, A-OTF Shin Maru Go Pro R, A-OTF 新丸ゴ Pro R, 䄭佔䘠遖諛荓⁐牯", display_name: "Shin Maru Go Pro", url: 'local', download: 'https://fontsgeek.com/a-otf-shin-maru-go-pro-font', recommended: false, bugged: false},
175 | "Shokaki-Utage" : {full_font_name: "'ShokakiUtage-FreeVer.','しょかきうたげ(無料版)', 芵若芩芫芤芽芰腩隳鞿铅腪", display_name: "Shokaki Utage Free", url: 'local', download: 'https://shokaki.booth.pm/items/1492419', recommended: false, bugged: true},
176 | "Sword-Kanji" : {full_font_name: "Sword Kanji", display_name: "Sword Kanji", url: 'local', download: 'https://jref.com/resources/sword-kanji.105/', recommended: false, bugged: false},
177 | "TT-Edit" : {full_font_name: "TTEditFont, ぷちくまふぉんと細め, 呔䕤楴䙯湴", display_name: "TT Edit", url: 'local', download: 'https://japanesefonts.org/tteditfont.html', recommended: false, bugged: false},
178 | "YDWaosagi" : {full_font_name: "YDW aosagi, YDW あおさぎ, YDW aosagiR, YDW あおさぎ R, 奄圠芠芨芳芬, 奄圠芠芨芳芬⁒", display_name: "YDW Aosagi", url: 'local', download: 'https://booth.pm/ja/items/4742238', recommended: false, bugged: false},
179 | "Yoko-Moji" : {full_font_name: "yoko-moji, YOKO文字, 奏䭏閶躚", display_name: "Yoko Moji", url: 'local', download: 'https://note.com/chitosekato/n/nc162552f8c1f', recommended: false, bugged: false},
180 | "Y-OzFont" : {full_font_name: "'Y.OzFont', 'Y.OzFont', 艸腄艮芚艥芏芎芔", display_name: "Y OzFont", url: 'local', download: 'https://jref.com/resources/y-ozfont.115/', recommended: false, bugged: false},
181 | "Zin-Hena-Bokuryu-RCF" : {full_font_name: "ZinHenaBokuryu-RCF, ジンへな墨流-RCF", display_name: "Zin Hena Bokuryu RCF", url: 'local', download: 'http://zinsta.jp/font/download/dlcnt.cgi?file=f_fontbokurcf_rdf', recommended: false, bugged: false},
182 | "Zin-Hena-Bokuryu-RDF" : {full_font_name: "ZinHenaBokuryu-RDF, ジンへな墨流-RDF", display_name: "Zin Hena Bokuryu RDF", url: 'local', download: 'http://zinsta.jp/font/download/dlcnt.cgi?file=f_fontbokurcf_rdf', recommended: false, bugged: false},
183 | };
184 |
185 | // fonts that are selected by user to be shown
186 | let font_pool_selected = [];
187 |
188 | //===================================================================
189 | // Settings related stuff
190 | //-------------------------------------------------------------------
191 | function installSettingsMenu() {
192 | wkof.Menu.insert_script_link({
193 | name: script_id,
194 | submenu: 'Settings',
195 | title: script_name,
196 | on_click: settingsOpen
197 | });
198 | }
199 |
200 | function settingsPrepare(dialog) {
201 | dialog.dialog({width:500});
202 | }
203 | async function settingsSave(settings) {
204 | console.debug(script_name+': saving settings');
205 | await wkof.Settings.save(script_id);
206 | settingsApply(settings);
207 | settingsClose(settings);
208 | }
209 | async function settingsLoad() {
210 | console.debug(script_name+': loading settings...');
211 | const settings = await wkof.Settings.load(script_id);
212 | settingsApply(settings);
213 | }
214 | function settingsClose(settings) {
215 | // Remove all urls to fonts we don't use
216 | for (const [fontkey, value] of Object.entries(font_pool)) {
217 | if (!(fontkey in settings)) { continue; }
218 | if (!settings[fontkey]) { // check if font is disabled
219 | // if it is a non-Adobe webfont, uninstall webfont
220 | if (value.url !== 'local' && value.url !== 'adobe') {
221 | uninstallWebfont(value.full_font_name, value.url);
222 | }
223 | }
224 | }
225 | }
226 | function settingsApply(settings) {
227 | // clear cache of selected fonts
228 | font_pool_selected = [];
229 |
230 | // now refill the pool of selected fonts
231 | for (const [fontkey, value] of Object.entries(font_pool)) {
232 | if (!(fontkey in settings)) { continue; }
233 | if (settings[fontkey]) { // check if font is enabled
234 | if (value.url === 'local') { // check if local font is installed on machine
235 | if (!isFontInstalled(value.full_font_name)) { continue; }
236 | } else if (value.url === 'adobe') { // if it is a webfont from adobe
237 | // do nothing
238 | } else { // must be webfont not from adobe, so install it
239 | installWebfont(value.full_font_name, value.url);
240 | // recheck if font is installed on machine
241 | // if (!isFontInstalled(value.full_font_name)) { continue; }
242 | }
243 | // put fonts in selected fonts
244 | let frequency = settings[fontkey+'_frequency'];
245 | if (frequency === undefined) { frequency = 1; } // if script started first time, the value might be undefined
246 | frequency = Math.ceil(frequency);
247 | for (let i = 0; i < frequency; i++) {
248 | font_pool_selected.push(value);
249 | }
250 | }
251 | }
252 | let selected_fonts_debug = [...new Set(font_pool_selected.map(a => a.display_name))];
253 | console.debug(script_name+': applying font pool of ' + selected_fonts_debug.length + ' fonts:\n'+selected_fonts_debug);
254 |
255 | // check if reroll button enabled
256 | if ('reroll_button' in settings) {
257 | reroll_button_enabled = settings['reroll_button'];
258 | // let reroll_button = document.querySelector('#option-reroll-font');
259 | // if (reroll_button) reroll_button.classList.toggle('hidden', !settings['reroll_button']);
260 | }
261 |
262 | // randomly shuffle font pool
263 | shuffleArray(font_pool_selected);
264 |
265 | // apply random font again, but only if on matching page
266 | if (setup_complete && pageRegex.test(document.location.pathname)) {
267 | updateRandomFont();
268 | setflippedFontState();
269 | }
270 | }
271 |
272 | function settingsOpen() {
273 | // install webfonts, and remove non-accesible local fonts for selection
274 | let fonts_available = {};
275 | let fonts_unavailable = {};
276 | for (const [fontkey, value] of Object.entries(font_pool)) {
277 | if (value.url === 'local') { // LOCAL FONT
278 | if (isFontInstalled(value.full_font_name)) {
279 | fonts_available[fontkey] = value;
280 | } else {
281 | fonts_unavailable[fontkey] = value;
282 | }
283 | } else if (value.url === 'adobe') { // ADOBE WEBFONT
284 | fonts_available[fontkey] = value;
285 | } else { // GENERAL WEBFONT
286 | // if (isFontInstalled(value.full_font_name)) {
287 | // fonts_available[fontkey] = value;
288 | // fonts_available[fontkey].url = 'local';
289 | // } else {
290 | installWebfont(value.full_font_name, value.url);
291 | fonts_available[fontkey] = value;
292 | // }
293 | }
294 | }
295 |
296 | // order fonts alphabetically
297 | const fontkeys_available = Object.keys(fonts_available).sort((a, b) =>
298 | fonts_available[a].display_name.localeCompare(fonts_available[b].display_name, undefined, {sensitivity: 'base'})
299 | );
300 | const fontkeys_unavailable = Object.keys(fonts_unavailable).sort((a, b) =>
301 | fonts_unavailable[a].display_name.localeCompare(fonts_unavailable[b].display_name, undefined, {sensitivity: 'base'})
302 | );
303 |
304 | // prepare selection option for every font
305 | const font_available_selector = Object.fromEntries(fontkeys_available.map(fontkey => ['BOX_'+fontkey, {
306 | type: 'group',
307 | label: `${fonts_available[fontkey].display_name} ${fonts_available[fontkey].url !== 'local' ? ' ' : ''} `,
308 | content: {
309 | sampletext: {
310 | type: 'html',
311 | html: `${example_sentence}
`
312 | },
313 | [fontkey]: {
314 | type: 'checkbox',
315 | label: 'Use font in '+script_name,
316 | default: false,
317 | },
318 | [fontkey+'_frequency']: {
319 | type: 'number',
320 | label: 'Frequency',
321 | hover_tip: 'The higher the value, the more often you see this font during review. It is affected by how many fonts you have enabled.',
322 | default: 1,
323 | min: 1,
324 | step: 1,
325 | }
326 | }
327 | }]));
328 | const font_unavailable_selector = Object.fromEntries(fontkeys_unavailable.map(fontkey => ['BOX_'+fontkey, {
329 | type: 'html',
330 | html: `${fonts_unavailable[fontkey].download !== '' ? ' ' : ''}${fonts_unavailable[fontkey].display_name}
`,
331 | }]));
332 |
333 | // prepare configuration dialog
334 | let dialog = new wkof.Settings({
335 | script_id: script_id,
336 | title: script_name+' Settings',
337 | pre_open: settingsPrepare,
338 | on_save: settingsSave,
339 | on_close: settingsClose,
340 | content: {
341 | currentfont: {
342 | type: 'group',
343 | label: `Current Font: ${((font_randomized!==undefined) ? font_randomized.display_name : '?')} `,
344 | content: {
345 | sampletext: {
346 | type: 'html',
347 | html: `${example_sentence}
`
348 | }
349 | }
350 | },
351 | legend: {
352 | type: 'html',
353 | html: `: Recommended Font : Bugged on some browsers, doesn't show all glyphs
Jitai will during review only choose fonts that can fully represent the review item. (Except Safari browser, here it is recommended to choose only fonts that have all characters included.)
`
354 | },
355 | reroll_button: {
356 | type: 'checkbox',
357 | label: 'Show button for re-rolling font',
358 | default: false,
359 | },
360 | divider_available: {
361 | type: 'section',
362 | label: `Filter Fonts (${fontkeys_available.length} available)`
363 | },
364 | ...font_available_selector,
365 | divider_unavailable: {
366 | type: 'section',
367 | label: `Local Fonts not found: ${fontkeys_unavailable.length}`
368 | },
369 | legend_fonts_unavailable: {
370 | type: 'html',
371 | html: `: Font available online, visit download website. Note that not all browsers support local fonts due to font fingerprinting attacks.
`
372 | },
373 | ...font_unavailable_selector
374 | }
375 | });
376 | dialog.open();
377 | }
378 |
379 | // ===================================================================
380 | // Main Script Functionality
381 | // ===================================================================
382 |
383 | function isFontInstalled(font_name) {
384 | // Approach from kirupa.com/html5/detect_whether_font_is_installed.htm - thanks!
385 | // Will return false for the browser's default monospace font, sadly.
386 | var canvas = document.createElement('canvas');
387 | var context = canvas.getContext('2d');
388 | var text = "wim-—l~ツ亻".repeat(100); // Characters with widths that often vary between fonts.
389 |
390 | context.font = "72px monospace";
391 | var defaultWidth = context.measureText(text).width;
392 |
393 | // Microsoft Edge raises an error when a context's font is set to a string
394 | // containing certain special characters... so that needs to be handled.
395 | try {
396 | context.font = "72px " + font_name + ", monospace";
397 | } catch (e) {
398 | return false;
399 | }
400 | var testWidth = context.measureText(text).width;
401 |
402 | return testWidth !== defaultWidth;
403 | }
404 | function checkIfWebfontsLocallyInstalled() {
405 | // NOTE this function should run BEFORE addPreconnectLinks().
406 | // If it is run after, adobe-webfonts are falsely detected as local fonts
407 | for (const fontkey of Object.keys(font_pool)) {
408 | if (font_pool[fontkey].url === 'local') { return; }
409 | if (isFontInstalled(font_pool[fontkey].full_font_name)) {
410 | font_pool[fontkey].url = 'local';
411 | }
412 | }
413 | }
414 |
415 | function isCanvasBlank(canvas) {
416 | return !canvas.getContext('2d', { willReadFrequently: true })
417 | .getImageData(0, 0, canvas.width, canvas.height).data
418 | .some(channel => channel !== 0);
419 | }
420 | function canRepresentGlyphs(fontName, glyphs) {
421 | const canvas = document.createElement('canvas');
422 | canvas.width = 50;
423 | canvas.height = 50;
424 | const ctx = canvas.getContext("2d", { willReadFrequently: true });
425 | ctx.textBaseline = 'top';
426 | ctx.font = "24px " + fontName;
427 |
428 | // write each glyph on the canvas; if canvas is empty then glyph cannot be represented
429 | // BUG on Safari, ctx.fillText() doesn't work with custom fonts (sometimes?!)
430 | for (let i = 0; i < glyphs.length; i++) {
431 | ctx.fillText(glyphs[i], 0, 0);
432 | if (isCanvasBlank(canvas)) { return false; }
433 | ctx.clearRect(0, 0, canvas.width, canvas.height);
434 | }
435 |
436 | return true;
437 | }
438 |
439 | function installWebfont(font_name, url) {
440 | // If webfont already installed on local machine, don't need to reinstall
441 | if (isFontInstalled(font_name)) { return; }
442 |
443 | // install webfont
444 | const link = document.querySelector(`link[href="${url}"]`);
445 | if (link===null) {
446 | console.debug(script_name+': installing webfont '+font_name);
447 | const newlink = document.createElement("link");
448 | newlink.href = url;
449 | newlink.rel = "stylesheet";
450 | document.head.append(newlink);
451 | }
452 | }
453 | function uninstallWebfont(font_name, url) {
454 | const link = document.querySelector(`link[href="${url}"]`);
455 | if (link!==null) {
456 | console.debug(script_name+': uninstalling webfont '+font_name);
457 | link.remove();
458 | }
459 | }
460 | function addPreconnectLinks() {
461 | // add preconnect links to GoogleFonts servers
462 | let googleApiLink = document.querySelector(`link[href="https://fonts.googleapis.com"]`);
463 | if (!googleApiLink) {
464 | googleApiLink = document.createElement("link");
465 | googleApiLink.rel = "preconnect";
466 | googleApiLink.href = "https://fonts.googleapis.com";
467 | document.head.append(googleApiLink);
468 | }
469 | let gstaticLink = document.querySelector(`link[href="https://fonts.gstatic.com"]`);
470 | if (!gstaticLink) {
471 | gstaticLink = document.createElement("link");
472 | gstaticLink.rel = "preconnect";
473 | gstaticLink.href = "https://fonts.gstatic.com";
474 | gstaticLink.crossOrigin = true;
475 | document.head.append(gstaticLink);
476 | }
477 |
478 | // connect to AdobeFonts via their method
479 | let script = document.getElementById("adobe_fonts_script");
480 | if (!script) {
481 | script = document.createElement("script");
482 | script.setAttribute('id','adobe_fonts_script');
483 | script.innerHTML = `
484 | (function(d) {
485 | var config = {
486 | kitId: 'xad5qou',
487 | scriptTimeout: 3000,
488 | async: true
489 | },
490 | h=d.documentElement,t=setTimeout(function(){h.className=h.className.replace(/\bwf-loading\b/g,"")+" wf-inactive";},config.scriptTimeout),tk=d.createElement("script"),f=false,s=d.getElementsByTagName("script")[0],a;h.className+=" wf-loading";tk.src='https://use.typekit.net/'+config.kitId+'.js';tk.async=true;tk.onload=tk.onreadystatechange=function(){a=this.readyState;if(f||a&&a!="complete"&&a!="loaded")return;f=true;clearTimeout(t);try{Typekit.load(config)}catch(e){}};s.parentNode.insertBefore(tk,s)
491 | })(document);
492 | `;
493 | document.head.appendChild(script);
494 | }
495 | }
496 |
497 | function shuffleArray(array) {
498 | for (let i = array.length - 1; i > 0; i--) {
499 | const j = Math.floor(Math.random() * (i + 1));
500 | [array[i], array[j]] = [array[j], array[i]];
501 | }
502 | }
503 |
504 | function updateRandomFont() {
505 | // choose new random font
506 | const glyphs = item_element.innerText;
507 | if (font_pool_selected.length === 0) {
508 | console.warn(script_name+': empty font pool!')
509 | font_randomized = font_default;
510 | } else {
511 | let i = 0;
512 | do {
513 | i = i + 1;
514 | font_randomized = font_pool_selected[Math.floor(Math.random() * font_pool_selected.length)];
515 | } while (!canRepresentGlyphs(font_randomized.full_font_name, glyphs) && i < 100);
516 | if (i >= 100) {
517 | console.error(script_name+': consistent glyph errors -- falling back to default font');
518 | font_randomized = font_default;
519 | }
520 | }
521 | console.debug(script_name+': updating random font to '+font_randomized.display_name);
522 | style_element.innerHTML = style_element.innerHTML.replace(/(--font-family-japanese:).*;([\s\S]*?--font-family-japanese-hover:).*;/,`$1 ${font_randomized.full_font_name};$2 ${font_default.full_font_name};`);
523 | }
524 |
525 | function setflippedFontState() {
526 | const flipped = hover_flipped ? !modifier_held : modifier_held;
527 | item_element.classList.toggle('flipped', flipped);
528 | }
529 |
530 | function insertStyle() {
531 | // insert CSS
532 | if ((style_element = document.getElementById(`${script_id}-style`)) != null) return;
533 | style_element = document.createElement('style');
534 | style_element.setAttribute('id', `${script_id}-style`);
535 | style_element.innerHTML = `
536 | .font_label {
537 | font-size: 1.2em;
538 | display: flex;
539 | gap: 5px;
540 | align-items: center;
541 | }
542 | .font_label a:link, .font_label a:visited, .font_label a:hover, .font_label a:active, .font_label a i {
543 | text-decoration: none;
544 | }
545 | a i {
546 | font-style: normal;
547 | }
548 | .font_legend {
549 | text-align: center;
550 | margin: 15px !important;
551 | display: flex;
552 | flex-direction: column;
553 | align-items: flex-start;
554 | gap: 5px;
555 | padding-left: 5% !important;
556 | }
557 | p.font_legend {
558 | display: block;
559 | text-align: start;
560 | margin: 15px !important;
561 | padding: 0px !important;
562 | }
563 | .font_example {
564 | margin: 5px 10px 10px 10px !important;
565 | font-size: 1.6em;
566 | line-height: 1.1em;
567 | }
568 | .font_recommended::before {
569 | content: '⭐️';
570 | font-size: 1.4em;
571 | }
572 | .font_bugged::after {
573 | content: '🐛';
574 | font-size: 1.4em;
575 | }
576 | .downloadfont::before {
577 | content: '⬇️';
578 | font-size: 1.4em;
579 | }
580 | .character-header__characters {
581 | --font-family-japanese: ;
582 | --font-family-japanese-hover: ;
583 | font-family: var(--font-family-japanese);
584 | }
585 | .character-header__characters:hover { font-family: var(--font-family-japanese-hover); }
586 | .character-header__characters.flipped { font-family: var(--font-family-japanese-hover); }
587 | .character-header__characters.flipped:hover { font-family: var(--font-family-japanese); }
588 | `;
589 | document.head.appendChild(style_element);
590 | }
591 |
592 | function cacheDefaultElementStyles() {
593 | //if (font_default !== undefined && font_randomized !== undefined) return;
594 | item_element = document.getElementsByClassName("character-header__characters")[0];
595 | if (!item_element) return;
596 |
597 | // set default states
598 | font_default = {display_name:'Default Font', full_font_name:getComputedStyle(item_element).fontFamily};
599 | font_randomized = font_default;
600 | }
601 |
602 | //----------
603 | // Events
604 | //----------
605 |
606 | function onKeyDown(event) { // defines short-hand commands like re-roll font and show default font
607 | if (event.repeat) return;
608 | switch (event.key) {
609 | // on holding ctrl and shift, swap the shown font
610 | case 'Control':
611 | case 'Shift':
612 | if (!event.ctrlKey || !event.shiftKey) return;
613 | console.debug(script_name+': pressed shortcut to show default font');
614 | modifier_held = true;
615 | setflippedFontState();
616 | break;
617 | // on alt+j, update to a new random font
618 | case 'j':
619 | if (!(event.altKey || event.ctrlKey)) return;
620 | console.debug(script_name+': pressed shortcut to re-roll random font');
621 | updateRandomFont();
622 | setflippedFontState();
623 | break;
624 | }
625 | }
626 | function onKeyUp(event) { // if modifier keys are released, set modifier to false
627 | if (event.repeat) return;
628 | switch (event.key) {
629 | case 'Control':
630 | case 'Shift':
631 | modifier_held = false;
632 | setflippedFontState();
633 | break;
634 | }
635 | }
636 | function onLostFocus() {
637 | console.debug(script_name+': user lost focus, disabling modifier');
638 | modifier_held = false;
639 | setflippedFontState();
640 | }
641 | function onDidAnswerQuestion() {
642 | console.debug(script_name+': user answered question, show default font');
643 | if (!pageRegex.test(document.location.pathname)) return;
644 | hover_flipped = true;
645 | setflippedFontState();
646 | }
647 | function onDidUnanswerQuestion() {
648 | console.debug(script_name+': user reverted answer by Double-Checker script, showing random font again');
649 | if (!pageRegex.test(document.location.pathname)) return;
650 | hover_flipped = false;
651 | updateRandomFont();
652 | setflippedFontState();
653 | }
654 | function onWillShowNextQuestion() {
655 | console.debug(script_name+': about to show next question, re-rolling random font');
656 | if (!pageRegex.test(document.location.pathname)) return;
657 | hover_flipped = false;
658 | if (setup_complete) { // TODO: if check maybe not necessary, since event only triggered when setup already done?
659 | updateRandomFont();
660 | setflippedFontState();
661 | }
662 | }
663 |
664 | function registerJitaiEvents() {
665 | // on answer submission, invert hovering event
666 | // - normal : default font
667 | // - hovering: randomized font
668 | window.addEventListener("didAnswerQuestion", onDidAnswerQuestion, listenerOptions); // event is dispatched for the window only
669 |
670 | // on advancing to next item question, randomize font again
671 | window.addEventListener("willShowNextQuestion", onWillShowNextQuestion, listenerOptions); // event is dispatched for the window only
672 |
673 | // on reverting an answer by DoubleCheckScript, reroll random font and fix inverting of hovering
674 | window.addEventListener("didUnanswerQuestion", onDidUnanswerQuestion, listenerOptions); // event is dispatched for the window only
675 |
676 | // add event to show regular font
677 | // add event to reroll randomized font
678 | document.body.addEventListener("keydown", onKeyDown, listenerOptions);
679 | document.body.addEventListener("keyup", onKeyUp, listenerOptions);
680 | // when page loses focus, revert any temporary modifications
681 | document.body.addEventListener("blur", onLostFocus, listenerOptions);
682 | }
683 |
684 | function unregisterJitaiEvents() {
685 | window.removeEventListener("didAnswerQuestion", onDidAnswerQuestion, listenerOptions);
686 | window.removeEventListener("willShowNextQuestion", onWillShowNextQuestion, listenerOptions);
687 | window.removeEventListener("didUnanswerQuestion", onDidUnanswerQuestion, listenerOptions);
688 | document.body.removeEventListener("keydown", onKeyDown, listenerOptions);
689 | document.body.removeEventListener("keyup", onKeyUp, listenerOptions);
690 | document.body.removeEventListener("blur", onLostFocus, listenerOptions);
691 | }
692 |
693 | function installRerollButton() {
694 | if (!reroll_button_enabled) return;
695 | let reroll_button = document.querySelector('#option-reroll-font');
696 | if (reroll_button) return;
697 |
698 | // Install the reroll-font button
699 | console.debug(script_name+': install re-roll button');
700 | let elem = document.querySelector('#additional-content ul'); // putting this in if-else block so that even if button support breaks because of WaniKani change, rest of Jitai will still work
701 | if (elem)
702 | {
703 | document.querySelector('#additional-content ul').style.textAlign = 'center';
704 | // async function get_controller(name) {
705 | // return await Stimulus.getControllerForElementAndIdentifier(document.querySelector(`[data-controller~="${name}"]`),name);
706 | // }
707 | // let additional_content = get_controller('additional-content');
708 | // document.querySelector('#additional-content ul').insertAdjacentHTML('beforeend',
709 | // ``
719 | // );
720 | document.querySelector('#additional-content ul').insertAdjacentHTML('beforeend',
721 | ``
732 | );
733 |
734 | // install click event
735 | document.querySelector('#option-reroll-font').addEventListener('click', updateRandomFont);
736 | }
737 | else
738 | {
739 | console.error(script_name+': Cannot add re-roll font button!');
740 | }
741 |
742 | }
743 | function uninstallRerollButton() { // maybe not needed?
744 | let reroll_button = document.querySelector('#option-reroll-font');
745 | if (reroll_button)
746 | {
747 | console.debug(script_name+': removing re-roll button');
748 | reroll_button.remove();
749 | }
750 | }
751 |
752 |
753 | //===================================================================
754 | // Script Startup
755 | //-------------------------------------------------------------------
756 | function startup() {
757 | console.debug(script_name+': Performing initial setup...');
758 |
759 | // initialization of the Wanikani Open Framework
760 | if (!wkof) {
761 | if (confirm(script_name+' requires Wanikani Open Framework.\nDo you want to be forwarded to the installation instructions?')) {
762 | global.location.href = 'https://community.wanikani.com/t/instructions-installing-wanikani-open-framework/28549';
763 | }
764 | return;
765 | }
766 | if (wkof.version.compare_to(wkof_version_needed) === 'older') {
767 | if (confirm(script_name+' requires Wanikani Open Framework version '+wkof_version_needed+'.\nDo you want to be forwarded to the update page?')) {
768 | global.location.href = 'https://greasyfork.org/en/scripts/38582-wanikani-open-framework';
769 | }
770 | return;
771 | }
772 |
773 | const wkof_modules = 'Settings, Menu';
774 | wkof.include(wkof_modules);
775 | return wkof
776 | .ready(wkof_modules)
777 | .then(checkIfWebfontsLocallyInstalled)
778 | .then(addPreconnectLinks)
779 | .then(settingsLoad)
780 | .then(installSettingsMenu)
781 | .then(() => {
782 | setup_complete = true;
783 | console.info(script_name+': SETUP COMPLETE');
784 | });
785 | }
786 |
787 | function enterReviewsPage() {
788 | console.info(script_name+': entering reviews page -- caching elements and showing random font...');
789 | const wkof_modules = 'Menu';
790 | wkof.include(wkof_modules);
791 | return wkof
792 | .ready(wkof_modules)
793 | .then(cacheDefaultElementStyles)
794 | .then(insertStyle)
795 | .then(installRerollButton)
796 | .then(registerJitaiEvents)
797 | .then(installSettingsMenu)
798 | .then(setflippedFontState)
799 | .then(() => {
800 | if (font_pool_selected.length === 0) {
801 | setTimeout(() => {
802 | alert(script_name+' detected that you have no custom fonts selected. Click the cog on the top left to select some.\n\nIf you had some selected before and now they are suddenly gone... sorry, I\'m quite forgetful sometimes :\'(')
803 | }, 2000);
804 | }
805 | else
806 | {
807 | updateRandomFont();
808 | }
809 | });
810 | }
811 |
812 | function leaveReviewsPage() {
813 | console.info(script_name+': leaving reviews page -- removing jitai events and resetting to default font...');
814 | unregisterJitaiEvents();
815 | uninstallRerollButton();
816 | font_randomized = font_default;
817 | hover_flipped = false;
818 | modifier_held = false;
819 | if (style_element)
820 | {
821 | console.debug(script_name+': removing style element');
822 | document.head.removeChild(style_element);
823 | }
824 | }
825 |
826 | startup().then(() => {
827 | // on_pageload also allows array of pageregex, then onReviewsPage will get told which regex matched -- may be useful
828 | // see: https://community.wanikani.com/t/wanikani-open-framework-developer-thread/22231/606?u=marciska
829 | wkof.on_pageload(
830 | pageRegex,
831 | enterReviewsPage,
832 | leaveReviewsPage
833 | );
834 | });
835 |
836 | })(window);
837 |
--------------------------------------------------------------------------------