京东朗正体

在网页中使用京东朗正体

目前為 2024-10-11 提交的版本,檢視 最新版本

// ==UserScript==
// @name 京东朗正体
// @namespace JingDongLangZhengTi
// @version  1
// @description 在网页中使用京东朗正体
// @author LWF
// @license MIT
// @grant none
// @match *://*/*
// @run-at document-start
// ==/UserScript==

(function() {
    // 创建一个 <style> 元素
    const css = document.createElement('style');
    // 为 <style> 元素设置 CSS 内容,导入外部字体,并强制所有元素使用 JingDongLangZhengTi 字体
    css.innerHTML = `
        @font-face {
	font-family: 'JingDongLangZhengTi';
	src: url('https://jdrdl.jd.com/assets/fonts/JDLANGZHENGTI-L--GBK1-0.woff2') format('woff2'),
	url('https://jdrdl.jd.com/assets/fonts/JDLANGZHENGTI-L--GBK1-0.woff') format('woff');
	font-weight: 300;
	font-style: normal;
}

@font-face {
	font-family: 'JingDongLangZhengTi';
	src: url('https://jdrdl.jd.com/assets/fonts/JDLANGZHENGTI-R--GBK1-0.woff2') format('woff2'),
	url('https://jdrdl.jd.com/assets/fonts/JDLANGZHENGTI-R--GBK1-0.woff') format('woff');
	font-weight: normal;
	font-style: normal;
}

@font-face {
	font-family: 'JingDongLangZhengTi';
	src: url('https://jdrdl.jd.com/assets/fonts/JDLANGZHENGTI-SB--GBK1-0.woff2') format('woff2'),
	url('https://jdrdl.jd.com/assets/fonts/JDLANGZHENGTI-SB--GBK1-0.woff') format('woff');
	font-weight: 600;
	font-style: normal;
}

@font-face {
	font-family: 'JingDongLangZhengTi';
	src: url('https://jdrdl.jd.com/assets/fonts/JDLANGZHENGTI-B--GBK1-0.woff2') format('woff2'),
	url('https://jdrdl.jd.com/assets/fonts/JDLANGZHENGTI-B--GBK1-0.woff') format('woff');
	font-weight: bold;
	font-style: normal;
}
        * {
            font-family: 'JingDongLangZhengTi' !important;
        }
    `;
    // 将 <style> 元素添加到页面的 <head> 部分
    document.head.appendChild(css);
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址