百度知道美化

展开所有回答并居中显示

Version vom 18.05.2020. Aktuellste Version

// ==UserScript==
// @name         百度知道美化
// @namespace    http://tampermonkey.net/
// @version      0.4
// @description  展开所有回答并居中显示
// @author       AN drew
// @match        https://zhidao.baidu.com/*
// @require      https://code.jquery.com/jquery-3.1.1.min.js
// @grant        none
// ==/UserScript==


(function() {

    setInterval(function(){
        if($(".wgt-best-mask").css("display")=="block")
            $(".wgt-best-showbtn").click()

        $(".wgt-answers-mask").each(function(){
            if($(this).css("display")=="block")
                $(this).find(".wgt-answers-showbtn").click()
        })

        $(".jump-goto-star").attr("style","display:none; visibility:hidden; position:absolute; top:-1000px;");
    },1000)


    setTimeout(function(){
        $(".show-hide-dispute").click()
        $(".replyask-extandup-btn").click()
        $("a.f-green").parent().parent().parent().removeAttr("style")
        if($(".expend").get(0)!=null && $(".expend").hasClass("expend_hide")==false)
            $(".expend").get(0).click()
        var $wenku = $("a.f-green").parent().parent()
        var $wenkuclone = $wenku.clone(true)
        $wenku.remove()
        $wenkuclone.find(".wgt-best-open-wenku").css({"text-align": "center",
                                                      "padding-top": "15px",
                                                      "font-size": "16px",
                                                      "line-height": "26px"
                                                     })
        $(".quality-content-view-more").before($wenkuclone)
    },1000)

    $(".leftup").hide()
    $(".new-icon").hide()
    $("#show-answer-hide").click()
    $(".bannerdown").hide()
    $("#qb-side").hide()
    $(".wgt-ads").hide()
    $(".task-list-button").hide()    
    $(".exp-topwld-tip").hide()
    $(".question-number-text-chain").hide()
    $("#answer-bar.exp-answerbtn-yh").append("<style>#answer-bar.exp-answerbtn-yh::after{background:none}</style>");
    $(".wgt-bottom-union").hide()
    $(".line.qb-section").attr("style","display:flex;justify-content:center;align-items:center;");
    $(".aside.fixheight").hide()
    $(".wgt-bottom-ask").remove()
    $("#wgt-ecom-banner").hide()
    $(".grid.qb-side").hide()
    $("#wgt-ecom-related").hide()
    $(".wgt-push-bottom.mod-shadow.last").hide()
    $("#knowledge-answer").hide()

    setInterval((function(){
        $("#footer").attr("style","margin:0px 0px 20px 0px; padding:0px")
    }),1)

})();