Skip to content

Instantly share code, notes, and snippets.

@sorrycc
Last active February 6, 2023 08:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sorrycc/7bb9ced0736373aa0fd486ecc4c36b9b to your computer and use it in GitHub Desktop.
Save sorrycc/7bb9ced0736373aa0fd486ecc4c36b9b to your computer and use it in GitHub Desktop.
// ==UserScript==
// @name YuQue x 霞鹜文楷
// @namespace http://sorrycc.com/
// @version 0.1
// @description 使用「霞鹜文楷」字体
// @author sorrycc@gmail.com
// @match https://yuque.antfin.com/*
// @match https://*.yuque.com/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
/**
* 注意:需要先安装这个字体: https://github.com/lxgw/LxgwWenKai
*/
(function() {
'use strict';
function addGlobalStyle(css) {
var head, style;
head = document.getElementsByTagName('head')[0];
if (!head) { return; }
style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = css;
head.appendChild(style);
}
addGlobalStyle(`
.ne-viewer-body {
font-family: 'LXGW WenKai', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif, 'Segoe UI' !important;
}
`);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment