Force UI Sans-Serif & Clear Text

Override every element’s font and smoothing settings

// ==UserScript==
// @name         Force UI Sans-Serif & Clear Text
// @description  Override every element’s font and smoothing settings
// @match        *://*/*
// @run-at       document-start
// @version 0.0.1.20250601130239
// @namespace https://greasyfork.org/users/1435046
// ==/UserScript==

(function () {
  const style = document.createElement('style');
  style.textContent = `
    *:not([class*="fa-"]):not([class*="icon-"]):not([class*="material-"]):not([class*="fa"]):not([class*="icon"]):not([class*="material"]) {
      font-family: ui-rounded, ui-sans-serif, system-ui, sans-serif !important;
      text-rendering: optimizeLegibility !important;
    }
  `;
  document.documentElement.prepend(style);
})();