// ==UserScript== // @name 显示 Tapd 字体图标 // @namespace http://tapd.oa.com/ // @version 0.4 // @description 添加一段 style 显示 Tapd 字体图标 // @author Smadey // @match http://tapd.oa.com/* // @downloadURL none // ==/UserScript== (function() { 'use strict'; const fonts = [ { name: 'common.iconfont', src: 'https://tapd-1258474337.cos.ap-chengdu.myqcloud.com/tfl-hebe/iconfont/common.iconfont+1571887711313.woff' }, { name: 'editor.iconfont', src: 'https://tapd-1258474337.cos.ap-chengdu.myqcloud.com/tfl-hebe/iconfont/editor.iconfont+1571971608870.woff' }, ]; fonts.forEach((font) => { const style = document.createElement('style'); const text = document.createTextNode(` @font-face { font-family: "${font.name}"; src: url('${font.src}'); font-weight: normal; font-style: normal; } `); style.appendChild(text); document.head.appendChild(style); }); })();