精简 CSDN、简书、蒲公英、脚本之家、知乎专栏、百家号、爱码网
目前為
// ==UserScript==
// @name 精简常见文章网站
// @namespace http://tampermonkey.net/
// @license GPL-3.0
// @version 1.2
// @description 精简 CSDN、简书、蒲公英、脚本之家、知乎专栏、百家号、爱码网
// @author AiniyoMua
// @home-url https://greasyfork.org/zh-CN/scripts/459519
// @homepageURL https://greasyfork.org/zh-CN/scripts/459519
// @supportURL https://greasyfork.org/zh-CN/scripts/459519/feedback
// @match *://blog.csdn.net/*
// @match *://www.csdn.net/*
// @match *://www.jianshu.com/p/*
// @match *://events.jianshu.io/p/*
// @match *://www.jb51.net/article/*
// @match *://www.jb51.net/softjc/*
// @match *://www.jb51.net/news/*
// @match *://dandelioncloud.cn/article/*
// @match *://www.dandelioncloud.cn/article/*
// @match *://demo.dandelioncloud.cn/article/*
// @match *://zhuanlan.zhihu.com/p/*
// @match *://baijiahao.baidu.com/s*
// @match *://www.likecs.com/*
// @icon data:image/png;base64,AAABAAEAICACAAAAAAAwAQAAFgAAACgAAAAgAAAAQAAAAAEAAQAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////AA////Af/+P4Pf/H/Dn/x/w4f8/8OD+P/Dg/j/w8P4/8Ph+P/D4fD/w/Dh/8Pw4//D8MP/w/gD/8P4B//D+Af/w/gP/8P4H//D+B//w/gP/8P8D+/D/AHfw/wAH8P8AD/D/AYPw/4AAcP/AF3D/wf/w/8H/8P/j//B////gP///w4AAAB8AAAAOAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABgAAAAYAAAAGAAAABwAAAA+AAAAc=
// @grant GM_addStyle
// @run-at document-body
// ==/UserScript==
// ██ 注意 注意 ██:在本脚本 设置>通用>运行时期 里选择 document-body 以获得无感知脚本加载体验
// ██ 注意 注意 ██:在本脚本 设置>通用>运行时期 里选择 document-body 以获得无感知脚本加载体验
(function() {
if(window.location.hostname.includes("csdn")){ csdn();
}else if(window.location.hostname.includes("jianshu")){ jianshu();
}else if(window.location.hostname.includes("jb51")){ jiaoben();
}else if(window.location.hostname.includes("dandelioncloud")){ pugongying();
}else if(window.location.hostname.includes("zhihu")){ zhihu();
}else if(window.location.hostname.includes("baijiahao")){ baijiahao();
}else if(window.location.hostname.includes("likecs")){ likecs();
}
function csdn() {
const css1 = `
#tool-QRcode{display:none !important;}
.blog_container_aside{display:none !important;}
.programmer1Box{display:none !important;}
.recommendAdBox{display:none !important;}
#recommendAdBox{display:none !important;}
#csdn-toolbar{display:none !important;}
#recommendNps{display:none !important;}
#asideArchive{display:none !important;}
.hot-brand{display:none !important;}
.top-banner{display:none !important;}
.pudn-recommend{display:none !important;}
#wrapper{display:none !important;}
#mys-wrapper{display:none !important;}
.csdn-side-toolbar{display:none !important;}
.aside-box.kind_person.d-flex.flex-column{display:none !important;}
.blog-content-box{box-shadow: 0 16px 45px rgb(0 0 0 / 15%) !important;}
.content-list{box-shadow: 0 16px 16px rgb(0 0 0 / 3%) !important;}
.left-toolbox{padding-top: 0px !important;padding-bottom: 0px !important;height: 32px !important;}
body{background-image: none !important;}
.hide-article-box.hide-article-pos.text-center{display:none !important;}
`;
let css2 = `
body{background-image: none !important;}
`;
GM_addStyle(css1);
window.onload = function(){GM_addStyle(css2);};
}
function jianshu() {
// 嵌入式广告
// 头部
// 广告
// 底下文章推荐间广告
// 一样
// 右侧栏文章推荐,
// 左边三个悬浮按钮
// 主题文章,增加宽度,增加阴影
// 底边栏,点赞评论栏,更改padd
// 文章底部赞赏 div
const css1 = `
iframe{display:none !important;}
header{display:none !important;}
.-umr26{display:none !important;}
ins{display:none !important;}
#mv_ad_render{display:none !important;}
aside > div{display:none !important;}
._1pUUKr{display:none}
._gp-ck{width:900px !important;box-shadow: 0 16px 45px rgb(0 0 0 / 15%) !important;}
._1Jdfvb{padding:0 0 0 0 !important;}
._13lIbp{display:none !important;}
`;
GM_addStyle(css1);
}
function jiaoben() {
// 顶栏
// 头部
// 头部栏
// 头部菜单
// 头部 标签广告
// 三个mys 没用,因为广告是重新document嵌入的
// 右侧栏
// 左边正文更改宽度
// 正文父布局更改宽度
// 左边的分享、一键回顶 悬浮栏
// 文章主体 顶部的嵌入广告
// 文章主体 底部的嵌入广告
// 搜索栏
// 底部 更多文章推荐
// 关注脚本之家
// 您的位置
// 文章嵌入gg广告
// 文章嵌入gg广告
// 文章嵌入gg广告
// 文章嵌入gg广告
// 文章嵌入gg广告
// 文章主体框添加阴影
const css = `
#topbar{display: none !important;}
#header{display: none !important;}
#nav{display: none !important;}
#submenu{display: none !important;}
.pt10.clearfix{display: none !important;}
.mys-wrapper{display: none !important;}
#mys-wrapper{display: none !important;}
#mys-content{display: none !important;}
.main-right{display: none !important;}
.main-left{width: 1000px !important;}
#container{width: 1000px !important;}
#right-share{display: none !important;}
.lbd.clearfix{display: none !important;}
.lbd_bot.clearfix{display: none !important;}
.search{display: none !important;}
.xgcomm.clearfix{display: none !important;}
#ewm{display: none !important;}
.breadcrumb{display: none !important;}
.adsbygoogle{display: none !important;}
#aswift_1_host{display: none !important;}
#aswift_1{display: none !important;}
#aswift_2_host{display: none !important;}
#aswift_2{display: none !important;}
#article{box-shadow: 0 16px 45px rgb(0 0 0 / 15%) !important;}
`
GM_addStyle(css);
}
function pugongying() {
const css = `
.menu-top{display: none !important;}
#menu-aside{display: none !important;}
.adsbygoogle{display: none !important;}
.home.home-index{background-image: none !important;background: #F5F6F7 !important}
.main.fl{width: 85% !important;}
.single-entry p{color: #2b2b2b !important;}
body{background: #dfdfdf !important;background-color: #dfdfdf !important;}
#pjax_on{background: #dfdfdf !important;background-color: #dfdfdf !important;}
`
GM_addStyle(css);
}
function zhihu() {
// 更改文章主体 宽度
// 给文章主体添加阴影,与padding
// 更改评论区的宽度
// 更改标题关注按钮的距离
// 去掉右边悬浮按钮 点赞分享
// 更改顶栏高度
// 更改顶栏高度
// 更改顶栏高度
// 更改顶栏元素高度
// 更改顶栏元素高度
const css = `
.Post-NormalMain > div, .Post-NormalMain > header{width:880px !important;}
.Post-RichTextContainer{padding: 24px !important;box-shadow: 0 16px 45px rgb(0 0 0 / 15%) !important;}
.Post-NormalSub > div{width:880px !important;}
div.AuthorInfo{max-width: 880px !important;}
.Post-SideActions{display: none !important;}
div.ColumnPageHeader-content{height:30px !important;}
.Sticky.is-fixed {height:30px !important;}
div.ColumnPageHeader{height:30px !important;}
div.ColumnPageHeader-content > a > svg {height:30 !important;}
button.ColumnPageHeader-WriteButton {line-height: 28px !important;}
`
GM_addStyle(css);
window.onload = function(){document.querySelector("div.ColumnPageHeader-content > a > svg").setAttribute('height', 24);};
// 更改顶栏logo元素高度
}
function baijiahao() {
// 去掉右边栏
// 文章 匹配父布局宽度
// 文章主题更改宽度,添加阴影
// 顶栏去掉悬浮
const css = `
#ssr-content > div:nth-child(2) > div:nth-child(1) > div:nth-child(2){display: none !important;}
#ssr-content > div:nth-child(2) > div:nth-child(1) > div:nth-child(1){width:100% !important;}
#ssr-content > div:nth-child(2) > div:nth-child(1){width:880px !important;padding: 24px !important;box-shadow: 0 16px 45px rgb(0 0 0 / 15%) !important;}
#ssr-content > div:nth-child(2){padding-top: 8px !important;}
#ssr-content > div:nth-child(1){position: static !important;}
`
//#ssr-content > div:nth-child(1){height:36px !important;position: static !important;}
//#ssr-content > div:nth-child(1) > div:nth-child(1) > div{height:36px !important;}
//#ssr-content > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > form{display: none !important;}
GM_addStyle(css);
}
function likecs() {
// 右边栏
// 顶部导航栏
// 更改顶部标题的背景颜色
// 文章主体右边虚拟位置
// footer
// 更改背景颜色为白色
// 文章主体添加阴影,并适配父布局的宽度
// 设置文章主体的宽度
// 文章顶部的广告
// 顶部弹出广告
// 顶部弹出广告
const css = `
div.rigthbox{display: none !important;}
.main-nav.clearfix{display: none !important;padding: 8px 0 !important;background: #333 !important;}
div.site-wrapper > header {background: #333 !important;}
main.content > div.clearfix {display: none !important;}
div.site-wrapper > footer{display: none !important;}
div.site-wrapper{background: #fff !important;}
div.leftbox {box-shadow: 0 16px 45px rgb(0 0 0 / 15%) !important;width: 100%;}
main.content{max-width: 1000px !important;}
.post-content > div.contentbef{display: none !important;}
.adsbygoogle{display: none !important;}
.adsbygoogle-noablate{display: none !important;}
`
GM_addStyle(css);
}
})();