GitHub Classic Fonts

Use the pre-2017 fonts on GitHub, instead of whatever fonts GitHub's designers fancy each week

  1. // ==UserScript==
  2. // @name GitHub Classic Fonts
  3. // @namespace https://gf.qytechs.cn/en/users/8615-joeytwiddle
  4. // @version 1.0.0
  5. // @description Use the pre-2017 fonts on GitHub, instead of whatever fonts GitHub's designers fancy each week
  6. // @author joeytwiddle
  7. // @license ISC
  8. // @match https://github.com/*
  9. // @match https://*.github.com/*
  10. // @grant GM_addStyle
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. // Copied from my fork of Make GitHub Great Again, a Chrome extension which reverts a lot of GitHub's style changes
  17. // https://github.com/joeytwiddle/MakeGithubGreatAgain
  18.  
  19. // This version actually uses the monospace font set in your browser, so you can configure it more easily.
  20.  
  21. GM_addStyle(`
  22. /* main font */
  23. body,
  24. .markdown-body {
  25. font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  26. /* font-size: 14px; line-height: 1.5; color: #24292e; background-color: #fff; */
  27. }
  28.  
  29. /* monospace font styles from frameworks.css 2017/01/01 */
  30. code,
  31. kbd,
  32. pre,
  33. samp {
  34. font-family: monospace, monospace;
  35. }
  36. tt,
  37. code {
  38. font-family: monospace;
  39. }
  40. pre {
  41. font: 12px monospace
  42. }
  43. .CodeMirror,
  44. .CodeMirror-dialog input,
  45. .file-editor-textarea,
  46. .input-monospace {
  47. font-family: monospace, monospace;
  48. }
  49. .cm-s-github .CodeMirror-lines {
  50. font-family: monospace;
  51. }
  52.  
  53. /* monospace font styles from github.css 2017/01/01 */
  54. .branch-name {
  55. font: 12px monospace;
  56. }
  57. .commit-ref {
  58. font: 0.75em/2 monospace;
  59. }
  60. .commit .sha-block,
  61. .commit .sha {
  62. font-family: monospace;
  63. }
  64. .commit-desc pre {
  65. font-family: monospace;
  66. }
  67. .commit-tease-sha {
  68. font-family: monospace;
  69. }
  70. .blob-num {
  71. font-family: monospace;
  72. }
  73. .blob-code-inner {
  74. font-family: monospace;
  75. }
  76. .gollum-editor .gollum-editor-body {
  77. font-family: monospace;
  78. }
  79. .gollum-editor .expanded textarea {
  80. font-family: monospace;
  81. }
  82. .gollum-dialog-dialog-body fieldset .code {
  83. font-family: monospace;
  84. }
  85. kbd {
  86. font: 11px monospace;
  87. }
  88. .credit-card .cvv {
  89. font-family: monospace;
  90. }
  91. .credit-card .text {
  92. font-family: monospace;
  93. }
  94. .default-label .sha {
  95. font-family: monospace;
  96. }
  97.  
  98. /* monospace font styles from site.css 2017/01/01 */
  99. .alt-mono-font {
  100. font-family: monospace;
  101. }
  102. .pullquote {
  103. font-family: monospace;
  104. }
  105. .casestudy-body blockquote {
  106. font-family: monospace;
  107. }
  108. .file-info {
  109. font-family: monospace;
  110. }
  111. .text-mono {
  112. font-family: monospace;
  113. }
  114. `);
  115. })();

QingJ © 2025

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