ChatGPT 代码字体变小

让 ChatGPT 代码字体变小,

当前为 2024-08-26 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name ChatGPT Code Box Styling
  3. // @description Change the font size and enable word wrap in ChatGPT code boxes
  4. // @name:zh-CN ChatGPT 代码字体变小
  5. // @description:zh-CN 让 ChatGPT 代码字体变小,
  6. // @namespace https://gf.qytechs.cn/users/1169082/
  7. // @version 0.1
  8. // @author 人民的勤务员 <toniaiwanowskiskr47@gmail.com>
  9. // @match https://chatgpt.com/*
  10. // @grant none
  11. // @supportURL https://github.com/ChinaGodMan/UserScripts/issues
  12. // @homepageURL https://github.com/ChinaGodMan/UserScripts
  13. // ==/UserScript==
  14.  
  15. (function () {
  16. 'use strict'
  17.  
  18. // 创建并插入自定义的CSS样式
  19. const style = document.createElement('style')
  20. style.type = 'text/css'
  21. style.innerHTML = `
  22. pre code {
  23. font-size: 12px !important; /* 设置字体大小为12px */
  24. white-space: pre-wrap !important; /* 设置自动换行 */
  25. word-break: break-word !important; /* 设置单词断行 */
  26. }
  27.  
  28. pre {
  29. overflow-x: auto !important; /* 允许水平滚动 */
  30. }
  31. `
  32. document.head.appendChild(style)
  33. })()

QingJ © 2025

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