CSS: correction of font family on various sites

Change unusual fonts to more common ones

当前为 2020-12-29 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name CSS: correction of font family on various sites
  3. // @description Change unusual fonts to more common ones
  4. // @author MK
  5. // @homepage https://greasyfork.org/en/scripts/419347
  6. // @namespace https://greasyfork.org/users/309172
  7. // @include https://f.vision/*
  8. // @include http://f.vision/*
  9. // @include https://www.startpage.com/*
  10. // @include http://www.startpage.com/*
  11. // @version 1.0
  12. // @note v1.0 2020-12-29 - initial release
  13. // ==/UserScript==
  14.  
  15. (function() {
  16. var css = `
  17. body {
  18. font-family: "Segoe UI", Arial, Helvetica, sans-serif !important;
  19. }
  20. `;
  21.  
  22. if (typeof GM_addStyle != 'undefined') {
  23. GM_addStyle(css);
  24. } else if (typeof PRO_addStyle != 'undefined') {
  25. PRO_addStyle(css);
  26. } else if (typeof addStyle != 'undefined') {
  27. addStyle(css);
  28. } else {
  29. var node = document.createElement('style');
  30. node.type = 'text/css';
  31. node.appendChild(document.createTextNode(css));
  32. var heads = document.getElementsByTagName('head');
  33. if (heads.length > 0) {
  34. heads[0].appendChild(node);
  35. } else {
  36. // no head yet, stick it whereever
  37. document.documentElement.appendChild(node);
  38. }
  39. }
  40. })();