CSS: correction of font family on various sites

Correction of font family to substitute unusual fonts by more common ones

目前为 2021-01-01 提交的版本。查看 最新版本

  1. // ==UserScript==
  2. // @name CSS: correction of font family on various sites
  3. // @description Correction of font family to substitute unusual fonts by 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.1
  12. // @note v1.1 2021-01-01 - code is rewritten to add CSS to the end of the document instead of <HEAD> tag in order to overcome possible server side CSS with !important rule
  13. // @note v1.0 2020-12-29 - initial release
  14. // ==/UserScript==
  15.  
  16. (function() {
  17. var css = `
  18. body {
  19. font-family: "Segoe UI", Arial, Helvetica, sans-serif !important;
  20. }
  21. `;
  22.  
  23. if (typeof GM_addStyle != 'undefined') {
  24. GM_addStyle(css);
  25. } else if (typeof PRO_addStyle != 'undefined') {
  26. PRO_addStyle(css);
  27. } else if (typeof addStyle != 'undefined') {
  28. addStyle(css);
  29. } else {
  30. var node = document.createElement('style');
  31. node.type = 'text/css';
  32. node.appendChild(document.createTextNode(css));
  33. document.documentElement.appendChild(node);
  34. }
  35. })();