WeReadSytle
当前为
// ==UserScript==
// @name 微信读书
// @icon https://weread.qq.com/favicon.ico
// @namespace https://greasyfork.org/users/878514
// @version 20220222
// @description WeReadSytle
// @author Velens
// @match https://weread.qq.com/web/reader/*
// @require https://code.jquery.com/jquery-3.6.0.min.js
// @license MIT
// @grant GM_addStyle
// ==/UserScript==
(function() {
'use strict';
//正文
GM_addStyle(".readerContent .app_content {max-width: 100%; !important;}");
GM_addStyle(".wr_whiteTheme .readerContent .app_content {background-color: #C7EDCC; !important;}");
GM_addStyle(".wr_whiteTheme .readerChapterContent {color: #444444; !important;}");
//导航栏
GM_addStyle(".readerTopBar {max-width: 100%; !important;}");
GM_addStyle(".wr_whiteTheme .readerTopBar {background-color: #C7EDCC; !important;}");
//滚动条
GM_addStyle("body::-webkit-scrollbar {width: 0 !important;}");
//浮动菜单
GM_addStyle(".readerControls {margin-left: 46%; !important;}");
GM_addStyle(".readerControls {align-items: flex-end; !important;}");
$(window).scroll(function(){
var scroll = $(this).scrollTop();
var readerTopBar = document.getElementsByClassName("readerTopBar")[0];
var readerControls = document.getElementsByClassName("readerControls")[0];
if(scroll == 0){
// 顶部显示
readerTopBar.style.display = "flex";
readerControls.style.display = "flex";
}else{
// 下滑隐藏
readerTopBar.style.display = "none";
readerControls.style.display = "none";
}
});
})();