Last active
April 17, 2021 06:50
-
-
Save Lifeni/0d525e8b73cf50b1eda59e11ce8a5281 to your computer and use it in GitHub Desktop.
移除百度百科默认的宋体字体
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name 移除百度百科默认的宋体字体 | |
// @namespace https://github.com/Lifeni | |
// @version 0.0.2 | |
// @description 百度百科网页内容字体用的宋体,在低分辨率的屏幕下实现效果非常不好,替换成默认字体(顺便去了一点广告) | |
// @author Lifeni | |
// @match https://baike.baidu.com/item/* | |
// @grant none | |
// ==/UserScript== | |
(function () { | |
'use strict'; | |
document.querySelector(".content-wrapper .content")?.style.setProperty("font-family", "inherit", "important"); | |
document.querySelector(".side-catalog")?.style.setProperty("font-family", "inherit", "important"); | |
// 侧栏移除广告 | |
document.querySelector("#side-share")?.style.setProperty("display", "none", "important"); | |
document.querySelector(".union-content")?.style.setProperty("display", "none", "important"); | |
window.onload = () => { | |
setTimeout(() => { | |
document.querySelector(".right-ad")?.style.setProperty("display", "none", "important"); | |
}, 0) | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment