Readwise Stylesheet with LXGW Fonts

Applies LXGW fonts to Readwise for improved Chinese text display

スクリプトをインストールするには、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         Readwise Stylesheet with LXGW Fonts
// @name:zh-CN   Readwise 样式表与霞鹜文楷字体
// @name:zh-TW   Readwise 樣式表與霞鶩文楷字體
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  Applies LXGW fonts to Readwise for improved Chinese text display
// @description:zh-CN  为 Readwise 应用霞鹜文楷字体以改善中文文本显示
// @description:zh-TW  為 Readwise 應用霞鶩文楷字體以改善中文文本顯示
// @match        https://read.readwise.io/*
// @license      MIT
// @locale       en
// @locale       zh-CN
// @locale       zh-TW
// ==/UserScript==

(function() {
    'use strict';

    // Add the external stylesheets
    var stylesheets = [
        'https://cdn.jsdelivr.net/npm/@callmebill/lxgw-wenkai-web@latest/style.css',
        'https://cdn.jsdelivr.net/npm/[email protected]/style.css',
        'https://cdn.jsdelivr.net/npm/[email protected]/style.css'
    ];

    stylesheets.forEach(function(href) {
        var link = document.createElement('link');
        link.rel = 'stylesheet';
        link.href = href;
        document.head.appendChild(link);
    });

    // Add custom styles
    var style = document.createElement('style');
    style.textContent = `
        #document-text-content p, #document-text-content li, #document-text-content span {
            font-family: 'Source Serif VF', 'LXGW ZhenKai', 'LXGW WenKai Screen', 'LXGW WenKai TC"', sans-serif;
            unicode-range: U+4E00-9FFF;
        }

        #document-header h1, #document-text-content h1, #document-text-content h2, #document-text-content h3, #document-text-content h4, #document-text-content h5, #document-text-content h6 {
            font-family: serif;
            unicode-range: U+4E00-9FFF;
        }
    `;
    document.head.appendChild(style);
})();