Greasy Fork

Greasy Fork is available in English.

removeMiFont

修正小米社区在WIN10上字体撕裂问题

当前为 2022-01-15 提交的版本,查看 最新版本

// ==UserScript==
// @name         removeMiFont
// @namespace    http://tampermonkey.net/
// @version      0.3
// @description  修正小米社区在WIN10上字体撕裂问题
// @author       毛毛(来自非正常锤友研究中心QQ群155959969)
// @match        https://*.xiaomi.cn/*
// @icon         https://www.xiaomi.cn/favicon.ico
// @grant        none
// @license      GPL
// ==/UserScript==
(function () {
  'use strict';

  const addNewStyle = newStyle => {
    const styleElement = document.getElementById('styles_js');
    if (!styleElement) {
      styleElement = document.createElement('style');
      styleElement.type = 'text/css';
      styleElement.id = 'styles_js';
      document.getElementsByTagName('head')[0].appendChild(styleElement);
    }
    styleElement.appendChild(document.createTextNode(newStyle));
  }

  addNewStyle('html , html * {font-family:"微软雅黑,Tahoma,sans-serif"!important;}')
})();