Greasy Fork

Greasy Fork is available in English.

微信读书

修改字体、颜色,阅读时宽屏,隐藏一切

当前为 2024-05-11 提交的版本,查看 最新版本

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         微信读书
// @namespace    http://tampermonkey.net/
// @version      0.21
// @description  修改字体、颜色,阅读时宽屏,隐藏一切
// @author       Oscar
// @match        https://weread.qq.com/web/reader/*
// @license      AGPL License
// @grant        GM_addStyle
// ==/UserScript==

GM_addStyle(`
  * { font-family: 'Times New Roman', 'SimSun' !important; } /*字体*/
  /*.wr_whiteTheme *{color: rgba(20,20,92,100) !important; }*/ /*字颜色*/
  .wr_whiteTheme .readerContent .app_content { background-color: rgba(249,243,227,100) !important; } /*日间模式背景颜色*/
  img.wr_readerImage_opacity { opacity: 0.8 !important; } /*图片透明度*/
  .readerControls { margin-left: calc(50% - 80px) !important; } /*右移控制栏*/
  .app_content, .readerTopBar { max-width: 100% !important; } /*内容和顶部导航宽屏*/
  .readerControls, .readerTopBar { opacity: 0; } /*控制栏和顶部导航透明度*/
  .readerCatalog { left: 0 !important; } /*目录靠边*/
  .readerNotePanel { left: unset; right: 0 !important; } /*笔记靠边*/
`);

(function () {
    'use strict';

    var readerControls = document.querySelector('.readerControls');
    var readerTopBar = document.querySelector('.readerTopBar');

    if (readerControls && readerTopBar) {
        [readerControls, readerTopBar].forEach(function(control) {
            control.addEventListener('mouseenter', function() {
                this.style.opacity = '1';
            });
            control.addEventListener('mouseleave', function() {
                this.style.opacity = '0';
            });
        });
    }
})();