view kakuyomu-serif-webfont.user.js @ 149:f4d054e191ed default tip

Reduce FOUC
author nanaya <me@nanaya.net>
date Wed, 01 Oct 2025 20:26:16 +0900
parents cc5e741a4c87
children
line wrap: on
line source

// ==UserScript==
// @name        Kakuyomu serif webfont
// @namespace   https://nanaya.net
// @match       https://kakuyomu.jp/works/*
// @version     1.0.1
// @description Use webfont for serif text in Kakuyomu
// @author      nanaya
// @grant       GM_addStyle
// @run-at      document-start
// @downloadURL https://hg.nanaya.net/ec-userscripts/raw-file/tip/kakuyomu-serif-webfont.user.js
// ==/UserScript==

'use strict';

/* global GM_addStyle */
GM_addStyle(`
  @import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@200..900&display=swap');
  .widget-episodeBody.widget-episodeBody {
    font-family: 'Noto Serif JP', serif;
  }
`);