Greasy Fork

淘宝天猫PC网站默认字体替换

淘宝天猫PC网站的默认字体对高分屏显示不友好,替换为微软雅黑

// ==UserScript==
// @name         淘宝天猫PC网站默认字体替换
// @namespace    sprialmint
// @version      0.1
// @description  淘宝天猫PC网站的默认字体对高分屏显示不友好,替换为微软雅黑
// @author       sprialmint
// @match        *://*.taobao.com/*
// @match        *://*.tmall.com/*
// @icon         data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant        GM_addStyle
// @license MIT
// ==/UserScript==

(function() {
    'use strict';
    var fontStyle = 'body, button, input, select, textarea, a { font-family: -apple-system,BlinkMacSystemFont,Helvetica Neue,PingFang SC,Microsoft YaHei,Source Han Sans SC,Noto Sans CJK SC,WenQuanYi Micro Hei,sans-serif !important;letter-spacing: 0.5px !important;-webkit-tap-highlight-color: rgba(18,18,18,0) !important;  }';
    var domHead = document.getElementsByTagName('head')[0];
    var domStyle = document.createElement('style');
    domStyle.type = 'text/css';
    domStyle.rel = 'stylesheet';
    domStyle.appendChild(document.createTextNode(fontStyle));
    domHead.appendChild(domStyle);
})();