readable Quora

宽屏显示 + 护眼色 + 回答页大字号 + 页面动画美化。 Wide screen, big font-size, eye-protecting background color, animation effect.

当前为 2022-04-09 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name        readable Quora
// @author      qianjunlang
// @description 宽屏显示 + 护眼色 + 回答页大字号 + 页面动画美化。 Wide screen, big font-size, eye-protecting background color, animation effect.
// @match       *.quora.com/*
// @require     https://cdn.staticfile.org/jquery/3.3.1/jquery.min.js
// @version     5.1.5
// @run-at      document-idle
// @license MIT License
// @namespace https://greasyfork.org/users/861664
// @compatible  edge
// @compatible  chrome
// ==/UserScript==


var color_time = 4;
var move_time = 2;
var zoom_time = 0.8;

function anima(){

    var top_banner = "div.q-box:last-child > div.q-fixed.qu-fullX.qu-zIndex--header.qu-bg--raised.qu-borderBottom.qu-boxShadow--medium.qu-borderColor--raised:nth-child(2) > div.q-box > div.q-flex.qu-alignItems--center";
    $(top_banner).css({
        "width": parseInt(window.innerWidth -30) +"px",

        "transform":"translateX("+ (10- $(top_banner).position().left) +"px)",
        "transition-timing-function": "ease",
        "transition": move_time + 's',
        "transition-delay": color_time + 's',
    });

    $(".q-box.qu-display--inline-flex.qu-mr--large.Link___StyledBox-t2xg9c-0.KlcoI.SiteHeader___StyledLink-us2uvv-1.ZMeFq.qu-cursor--pointer.qu-hover--textDecoration--underline").css({
        "transform":"scale(0.8) translateX("+ (14) +"px)",
        "transition-timing-function": "ease-out",
        "transition": zoom_time + 's',
        "transition-delay": (color_time + move_time) + 's',
    });
}
//-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

$(document).ready(function(){
    $($(".qu-px--small")[0]).hide();
    $(".qu-bg--red").css({
        "background-image": "linear-gradient(to right, #e3622f, #ff7b00 , #ffc65a , violet 83%, rgb(185, 043, 039) 100% )", // "#9a68af"
    });
    $(".ioqSAj div.q-box").css({
        "margin-left": 10 + "px",
        "margin-right":0
    });
    $(".ioqSAj div.q-box").find("div").css({"margin-left":0, "margin-right":0});

    if( window.location.href == "https://www.quora.com/" || window.location.href.indexOf("/search?q=") >=0 ){
        $(".ioqSAj").css({"width": (window.innerWidth * 2) + "px",});

        $("#mainContent").css({"width": parseInt(
            window.innerWidth * (window.location.href.indexOf("/search?q=")<0 ? 0.655 : 0.84)
        )+"px",});

    }else{
        $(".ioqSAj").css({"width": (window.innerWidth -42) + "px",});
        $("#mainContent").css({
            "width": parseInt(window.innerWidth * 1.8)+"px",
            "font-size": "29px",
            "line-height": "36px",
            "font-family":"'Yu Gothic', Gadugi, copperplate, Calibri, Helvetica, Verdana, YouYuan,'Source Han Sans', Arial, Verdana, Sans-serif",
            "-webkit-font-smoothing": "antialiased",
        });

        $(".qu-mb--large div div.q-box").css({
            "font-size":"14px",
            "line-height": "15px",
            "font-family":" 'Trebuchet MS', Geneva, Tahoma, Gadugi, copperplate, Calibri, Helvetica, Verdana, YouYuan,'Source Han Sans', Arial, Verdana, Sans-serif",
            "-webkit-font-smoothing": "none",
        });
    }

    $(".qu-bg--raised").css({
        "-webkit-font-smoothing": "antialiased",

        "background":"#deecc2", //dbeec6
        "transition-timing-function": "ease",
        "transition": color_time + 's',
    });
    $("#root").css({
        "width": (window.innerWidth - 10) + "px",
        "overflow":"hidden",

        "background": "#d4ebc7",//"#EBF4BD",//"#CCE8CF",
        "transition-timing-function": "ease",
        "transition": color_time + 's',
    });

    window.onload = anima();
});