Created
June 8, 2023 09:29
-
-
Save codethereforam/fe5b50b4e70414602d2b7a600055ae37 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/codethereforam/ | |
// @version 0.1 | |
// @description 去除简书一切不必要的页面元素 | |
// @author https://github.com/codethereforam/ | |
// @match https://*.jianshu.com/* | |
// @icon https://www.google.com/s2/favicons?sz=64&domain=jianshu.com | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
const main = document.querySelector('[role="main"]').children[0].children[0]; | |
document.body.innerHTML = ""; | |
document.body.appendChild(main); | |
document.body.style = "padding-right: 20%;padding-left: 20%;" | |
// 解决图片无法加载问题 | |
for (const img of document.querySelectorAll("img")) { | |
img.src = img.getAttribute("data-original-src"); | |
} | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment