微信读书

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

目前為 2024-07-07 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name         微信读书
// @namespace    http://tampermonkey.net/
// @version      0.22
// @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: unset; right: 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';
            });
        });
    }
})();