Qwen.ai CodeBlock Font Fix (No More Serif)

让 Qwen Chat 代码快使用非衬线字体, 让代码快更加美观易读. Use sans-serif fonts to make the Qwen Chat code block more aesthetically pleasing and readable

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         Qwen.ai CodeBlock Font Fix (No More Serif)
// @namespace    http://tampermonkey.net/
// @version      1.2
// @description  让 Qwen Chat 代码快使用非衬线字体, 让代码快更加美观易读. Use sans-serif fonts to make the Qwen Chat code block more aesthetically pleasing and readable
// @author       DBin_K
// @match        https://chat.qwen.ai/*
// @grant        none
// @license      MIT
// ==/UserScript==

(function () {
    'use strict';

    // 设置目标字体
    const monoFont = '"Lucida Console", Consolas';

    // 创建 <style> 标签
    const style = document.createElement('style');
    style.type = 'text/css';
    style.innerHTML = `
        .ͼ1 .cm-scroller {
            font-family: ${monoFont} !important;
        }
    `;

    // 插入到 <head> 中生效
    document.head.appendChild(style);
})();