WaniKani random font

Randomize between Japanese fonts on WaniKani.

スクリプトをインストールするには、Tampermonkey, GreasemonkeyViolentmonkey のような拡張機能のインストールが必要です。

You will need to install an extension such as Tampermonkey to install this script.

スクリプトをインストールするには、TampermonkeyViolentmonkey のような拡張機能のインストールが必要です。

スクリプトをインストールするには、TampermonkeyUserscripts のような拡張機能のインストールが必要です。

このスクリプトをインストールするには、Tampermonkeyなどの拡張機能をインストールする必要があります。

このスクリプトをインストールするには、ユーザースクリプト管理ツールの拡張機能をインストールする必要があります。

(ユーザースクリプト管理ツールは設定済みなのでインストール!)

このスタイルをインストールするには、Stylusなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus などの拡張機能をインストールする必要があります。

このスタイルをインストールするには、Stylus tなどの拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

このスタイルをインストールするには、ユーザースタイル管理用の拡張機能をインストールする必要があります。

(ユーザースタイル管理ツールは設定済みなのでインストール!)

このスクリプトの質問や評価の投稿はこちら通報はこちらへお寄せください
// ==UserScript==
// @name        WaniKani random font
// @namespace   https://www.wanikani.com/?hey-koichi-please-implement-random-wanikani-font
// @description Randomize between Japanese fonts on WaniKani.
// @include     https://wanikani.com/*
// @include     https://www.wanikani.com/*
// @version     1
// @grant       none
// ==/UserScript==

$(function() {
	// Modify here --------------------------------------------------------
	var fonts = [
		'A-OTF Shin Maru Go Pro M',
		'EPSON 行書体M',
		'EPSON 正楷書体M',
		'EPSON 教科書体M',
		'EPSON 太明朝体B',
		'EPSON 太行書体B',
        'EPSON 太角ゴシック体B Regular',
		'EPSON 太丸ゴシック体B Regular',
        'EPSON 丸ゴシック体M',
		'KanjiStrokeOrders',
		'Meiryo',
		'nagayama_kai',
        'Kozuka Gothic Pr6N',
        'Kozuka Gothic Pro',
        'Kozuka MIncho Pr6N',
        'Kozuka Mincho Pro',
        'MS Gothic Regular',
        'MS Mincho Regular',
        'MS PGothic Regular',
        'MS PMincho Regular',
        'MS UI Gothic Regular',
        'Yu Gothic',
        'Yu Gothic UI',
        'Yu Mincho',
	];
	var good = 'Meiryo';
	var interval = 60; // Seconds
	// No more touchie past this point ------------------------------------



	var randomFont = function() {
		var chosen = fonts[Math.floor(Math.random() * fonts.length)];
		$('[lang="ja"], #user-response').css('font-family', chosen).hover(function() {
			$(this).css('font-family', good);
		}, function() {
			$(this).css('font-family', chosen);
		});
	};
	randomFont();
	setInterval(randomFont, interval * 1000);
});