Greasy Fork is available in English.
360问答隐藏左栏,隐藏广告,显示全部回答;360新知隐藏右栏,隐藏插屏广告
当前为
// ==UserScript==
// @name 360问答美化&360新知美化
// @namespace http://tampermonkey.net/
// @version 0.3
// @description 360问答隐藏左栏,隐藏广告,显示全部回答;360新知隐藏右栏,隐藏插屏广告
// @author AN drew
// @match https://wenda.so.com/*
// @match http://xinzhi.wenda.so.com/a/*
// @grant none
// ==/UserScript==
function getByClass(sClass){
var aResult=[];
var aEle=document.getElementsByTagName('*');
for(var i=0;i<aEle.length;i++){
/*将每个className拆分*/
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 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 mod_detail_normal = getByClass("mod-detail-normal")[0]
if(mod_detail_normal != null)
mod_detail_normal.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")
}
}
}
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 aside = getByClass("aside")[0]
var url = window.location.href;
if(aside != null && url.indexOf("wenda.so.com/q")!= -1)
aside.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");
})();