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

  1. // ==UserScript==
  2. // @name Qwen.ai CodeBlock Font Fix (No More Serif)
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.2
  5. // @description 让 Qwen Chat 代码快使用非衬线字体, 让代码快更加美观易读. Use sans-serif fonts to make the Qwen Chat code block more aesthetically pleasing and readable
  6. // @author DBin_K
  7. // @match https://chat.qwen.ai/*
  8. // @grant none
  9. // @license MIT
  10. // ==/UserScript==
  11.  
  12. (function () {
  13. 'use strict';
  14.  
  15. // 设置目标字体
  16. const monoFont = '"Lucida Console", Consolas';
  17.  
  18. // 创建 <style> 标签
  19. const style = document.createElement('style');
  20. style.type = 'text/css';
  21. style.innerHTML = `
  22. 1 .cm-scroller {
  23. font-family: ${monoFont} !important;
  24. }
  25. `;
  26.  
  27. // 插入到 <head> 中生效
  28. document.head.appendChild(style);
  29. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址