Hack Font for GitHub

Set Font Hack as monofont for GitHub

  1. // ==UserScript==
  2. // @name Hack Font for GitHub
  3. // @namespace HackGitHub
  4. // @version 1.0
  5. // @description Set Font Hack as monofont for GitHub
  6. // @author Gleb Liutsko
  7. // @match https://github.com/*
  8. // @grant none
  9. // @license MIT
  10. // ==/UserScript==
  11.  
  12. (function() {
  13. 'use strict';
  14.  
  15. let cssStyle = `
  16. .blob-code-inner, pre code, .CodeMirror pre.CodeMirror-line, .CodeMirror pre.CodeMirror-line-like {
  17. font-family: Hack;
  18. }`;
  19.  
  20. let styleElement = document.createElement('style');
  21. styleElement.innerText = cssStyle;
  22.  
  23. document.head.appendChild(styleElement);
  24. })();