360问答美化&360新知美化

360问答隐藏左栏,隐藏广告,显示全部回答;360新知隐藏右栏,隐藏插屏广告;支持电脑端和手机端

目前为 2020-04-29 提交的版本。查看 最新版本

// ==UserScript==
// @name         360问答美化&360新知美化
// @namespace    http://tampermonkey.net/
// @version      0.6.3.1
// @description  360问答隐藏左栏,隐藏广告,显示全部回答;360新知隐藏右栏,隐藏插屏广告;支持电脑端和手机端
// @author       AN drew
// @match        https://*.wenda.so.com/*
// @match        http://xinzhi.wenda.so.com/*
// @grant        none
// ==/UserScript==
function getByClass(sClass){
    var aResult=[];
    var aEle=document.getElementsByTagName('*');
    for(var i=0;i<aEle.length;i++)
    {
        /*将每个className拆分*/
        if(typeof(aEle[i].className)=='string')
        {
            var arr=aEle[i].className.split(/\s+/);
            for(var j=0;j<arr.length;j++)
            {
                /*判断拆分后的数组中有没有满足的class*/
                if(arr[j]==sClass)
                {
                    aResult.push(aEle[i]);
                }
            }
        }
    }
    return aResult;
};

(function() {

    var url = window.location.href;
    if(url.indexOf("wenda.so.com/u")== -1)
    {
        var article = getByClass("article")[0]
        if(article != null)
            article.style.width="1175px"
    }

    var detail_leftside_rec= document.getElementById("detail-leftside-rec");
    if(detail_leftside_rec != null)
        detail_leftside_rec.setAttribute("style","display:none")

    var js_mod_fixed_float = document.getElementById("js-mod-fixed-float");
    if(js_mod_fixed_float != null)
        js_mod_fixed_float.setAttribute("style","display:none")

    var top_search_banner = getByClass("top-search-banner")[0]
    if(top_search_banner != null)
        top_search_banner.setAttribute("style","display:none")

    var detail_guess = getByClass("detail-guess")[0]
    if(detail_guess != null)
        detail_guess.setAttribute("style","display:none")

    var detail_guess_wrap = document.getElementById("detail-guess-wrap");
    if(detail_guess_wrap != null)
        detail_guess_wrap.setAttribute("style","display:none")

    var js_mod_recommond_list = document.getElementById("js-mod-recommond-list");
    if(js_mod_recommond_list != null)
        js_mod_recommond_list.setAttribute("style","display:none")

    var h2s = document.getElementsByTagName("h2");
    if(h2s != null)
    {
        for(var i=0; i<h2s.length; i++)
        {
            if(h2s[i].innerHTML.indexOf("您可能感兴趣的内容") != -1)
            {
                h2s[i].setAttribute("style","display:none")
            }
            else if(h2s[i].innerHTML.indexOf("为您推荐") != -1)
            {
                h2s[i].setAttribute("style","display:none")
            }
            else if(h2s[i].innerHTML.indexOf("今日热点") != -1)
            {
                h2s[i].setAttribute("style","display:none")
            }
            else if(h2s[i].innerHTML.indexOf("相关资讯") != -1)
            {
                h2s[i].setAttribute("style","display:none")
            }
        }
    }

    var autoList = document.getElementById("autoList");
    if(autoList != null)
        autoList.setAttribute("style","display:none")

    var onesearch = document.getElementById("onesearch");
    if(onesearch != null)
        onesearch.setAttribute("style","display:none")

    var task_left_wrap = document.getElementById("task-left-wrap");
    if(task_left_wrap != null)
        task_left_wrap.setAttribute("style","display:none")

    var mod_see_other = getByClass("mod-see-other")[0];
    if(mod_see_other != null)
        mod_see_other.click()

    var btn_wrap = getByClass("btn-wrap")[0];
    if(btn_wrap != null)
        btn_wrap.click()

    var aside = getByClass("aside")
    if(aside != null && url.indexOf("wenda.so.com/u")== -1)
    {
        for(i =0; i<aside.length; i++)
        {
            console.log(aside[i])
            aside[i].setAttribute("style","display:none");
        }
    }

    var js_fixed_rt_bot_inn = document.getElementById("js-fixed-rt-bot-inn");
    if(js_fixed_rt_bot_inn != null)
        js_fixed_rt_bot_inn.setAttribute("style","display:none");

    var busi_article = getByClass("busi-article");
    if(busi_article != null)
    {
        for(i =0; i<busi_article.length; i++)
        {
            busi_article[i].setAttribute("style","display:none");
        }
    }

    var e_xinzhi_detail_interested = document.getElementById("e_xinzhi_detail_interested");
    if(e_xinzhi_detail_interested != null)
        e_xinzhi_detail_interested.setAttribute("style","display:none");

    var js_list_item = document.getElementById("js-list-item");
    if(js_list_item != null)
        js_list_item.setAttribute("style","display:none");


    var news_card = document.getElementById("news-card");
    if(news_card != null)
        news_card.setAttribute("style","display:none");

    var garllery = document.getElementById("garllery");
    if(garllery != null)
        garllery.setAttribute("style","display:none");

    var business = document.getElementById("business");
    if(business != null)
        business.setAttribute("style","display:none");

    var card_bor = getByClass("card-bor");
    if(card_bor != null)
    {
        for(i =0; i<card_bor.length; i++)
        {
            card_bor[i].setAttribute("style","display:none");
        }
    }

    var js_relate_list = getByClass("js-relate-list")[0]
    if(js_relate_list != null)
        js_relate_list.setAttribute("style","display:none")

    var js_ajax_askmore = getByClass("js-ajax-askmore")[0]
    if(js_ajax_askmore != null)
        js_ajax_askmore.setAttribute("style","display:none")

    var js_interest_list = getByClass("js-interest-list")[0]
    if(js_interest_list != null)
        js_interest_list.setAttribute("style","display:none")

    var interest_list = document.getElementById("interest-list");
    if(interest_list != null)
        interest_list.setAttribute("style","display:none")


    var g_scroll_loading = getByClass("g-scroll-loading")[0]
    if(g_scroll_loading != null)
        g_scroll_loading.setAttribute("style","display:none")


    var info_list = document.getElementById("info-list");
    if(info_list != null)
        info_list.setAttribute("style","display:none")


    var js_rec = document.getElementById("js-rec");
    if(js_rec != null)
        js_rec.setAttribute("style","display:none")


    var mod_detail_normal = getByClass("mod-detail-normal");
    if(mod_detail_normal != null)
    {
        for(i =0; i<mod_detail_normal.length; i++)
        {
            mod_detail_normal[i].setAttribute("style","display:none; visibility:hidden");
        }
    }
    var js_busi_item = getByClass("js-busi-item")
    if(js_busi_item != null)
    {
        for(i =0; i<js_busi_item.length; i++)
        {
            js_busi_item[i].setAttribute("style","display:none; visibility:hidden");
        }
    }

    var mod_share = getByClass("mod-share")[0]
    if(mod_share != null)
        mod_share.setAttribute("style","display:none")

    var mod_wechat_qrcode_mini = getByClass("mod-wechat-qrcode-mini")[0]
    if(mod_wechat_qrcode_mini != null)
        mod_wechat_qrcode_mini.setAttribute("style","display:none")
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址