您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Greasy Fork is available in English.
优化微信读书阅读界面
当前为
// ==UserScript== // @name 微信读书舒适版(改) // @version 0.0.1 // @namespace http://tampermonkey.net/ // @description 优化微信读书阅读界面 // @contributor // @author // @license MIT // @match https://weread.qq.com/web/reader/* // @require https://cdn.staticfile.org/jquery/3.3.1/jquery.min.js // @require http://cdn.staticfile.org/jquery/1.8.3/jquery.min.js // @require https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js // @icon https://weread.qq.com/favicon.ico // @grant GM_log // @grant GM_addStyle // @grant unsafeWindow // @grant GM_setValue // @grant GM_getValue // @grant GM_openInTab // @grant GM_download // @grant GM_setClipboard // @grant GM_notification // ==/UserScript== // 布局-全屏 GM_addStyle(".wr_page_reader .app_content {margin-left: 0; margin-right:0; max-width: 100%; !important;}"); GM_addStyle(".readerTopBar {max-width: 100%; height: 45px; !important;}"); GM_addStyle(".readerControls {margin-bottom: -28px; left: 5px; margin-left: 5px; !important;}"); // 亮色主题-淡黄色 GM_addStyle(".wr_whiteTheme .readerHeaderButton {color: #5d646e !important;}"); GM_addStyle(".wr_whiteTheme .readerTopBar {background-color: #fff6dd !important;}"); GM_addStyle(".wr_whiteTheme .readerContent .app_content {background-color: #fff6dd; !important;}"); GM_addStyle(".wr_whiteTheme .readerFooter_button {color: #5d646e; background-color: #fec046; !important;}"); // 点击-隐藏标题和按钮 (function (){ const set_title_display = function(display) { document.getElementsByClassName("readerTopBar")[0].style.display = display document.getElementsByClassName("readerControls")[0].style.display = display } const is_title_hidden = () => document.getElementsByClassName("readerTopBar")[0].style.display == 'none' const toggle_tittle_show = () => is_title_hidden() ? set_title_display('flex') : set_title_display('none') const is_click = () => { // 有阅读工具栏时是选择文字而不是点击页面 const el = document.getElementsByClassName("reader_toolbar_container") return !el.length || el[0].style.display == 'none' } document.getElementsByClassName("app_content")[0].addEventListener('click', () => is_click() ? toggle_tittle_show() : null) })()