// ==UserScript== // @name 精简常见文章网站 // @namespace http://tampermonkey.net/ // @license GPL-3.0 // @version 1.5 // @description 精简 CSDN、简书、蒲公英、脚本之家、知乎专栏、百家号、爱码网、ITEYE、bbsmax论坛、微信公众号 // @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 *://www.jb51.net/shouji/* // @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/* // @match *://www.iteye.com/* // @match *://www.bbsmax.com/* // @match *://mp.weixin.qq.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 // @downloadURL none // ==/UserScript== // ██ 注意 注意 ██:在本脚本 设置>通用>运行时期 里选择 document-start 以获得无感知脚本加载体验 // ██ 注意 注意 ██:在本脚本 设置>通用>运行时期 里选择 document-start 以获得无感知脚本加载体验 (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(); }else if(window.location.hostname.includes("iteye")){ iteye(); }else if(window.location.hostname.includes("bbsmax")){ bbsmax(); }else if(window.location.hostname.includes("weixin")){ weixin(); } function csdn() { // 鼠标悬浮弹出分享框 // blog-content-box 添加阴影,增加padd const css1 = ` #tool-QRcode{display:none !important;} #mainBox > main{width:100% !important;} #mainBox{width:980px !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;padding: 0 40px 16px !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;} `; // 去掉背景 const css2 = ` body{background-image: none !important;} `; GM_addStyle(css1); window.onload = function(){GM_addStyle(css2);}; } function jianshu() { // 简书需要延迟一点时间,再加载脚本 document.addEventListener("DOMContentLoaded", function(event) {jianshu2();}); } function jianshu2() { // 嵌入式广告 // 头部 // 广告 // 底下文章推荐间广告 // 一样 // 右侧栏文章推荐, // 左边三个悬浮按钮 // 主体文章,增加宽度,增加阴影 // 主体文章,更改padd // 底边栏,点赞评论栏,更改padd // 文章底部赞赏 div // 主体文章,更改margin left 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;} ._gp-ck > section:nth-child(1){padding: 30px 40px !important;} ._1Jdfvb{padding:0 0 0 0 !important;} ._13lIbp{display:none !important;} div._3VRLsv{margin-left: calc((100vw - 800px) /2) !important;} `; GM_addStyle(css1); } function jiaoben() { // 顶栏 // 头部 // 头部栏 // 头部菜单 // 头部 标签广告 // 三个mys 没用,因为广告是重新document嵌入的 // 右侧栏 // 左边正文更改宽度 // 正文父布局更改宽度 // 左边的分享、一键回顶 悬浮栏 // 文章主体 顶部的嵌入广告 // 文章主体 底部的嵌入广告 // 搜索栏 // 底部 更多文章推荐 // 关注脚本之家 // 您的位置 // 文章嵌入gg广告 // 文章嵌入gg广告 // 文章嵌入gg广告 // 文章嵌入gg广告 // 文章嵌入gg广告 // 文章主体框添加阴影,更改padd 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;padding: 15px 40px 0 !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: 20px 40px !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:890px !important;padding: 12px 40px !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); } function iteye() { // 文章正文宽度 // 文章正文去掉边框,更改padd,添加阴影,宽度匹配父布局 // 去掉右下角悬浮框礼盒 // 右边栏放在文章底部 // 右边栏更改宽度 // 去掉左边栏 // 去掉原本底部假的文章推荐(其实它可以直接抢钱的) const css = ` div#content{width: 820px !important;} div#main{border: none !important;padding: 5px 24px !important;box-shadow: 0 16px 45px rgb(0 0 0 / 15%) !important;width: 100% !important;} div#main > div.csdn-side-toolbar{display: none !important;} div.blog-sidebar{width: 100% !important;} div.recommend-right{width: 100% !important;padding: 5px 24px !important;} div#local{display: none !important;} div.comments{display: none !important;} ` GM_addStyle(css); } function bbsmax() { // 文章正文上面未知空白 // 文章正文上面未知空白 // 出售独享账号,广告 // 主体文章更改宽度 // 主体文章更改padd,添加阴影 // 顶栏更改高度 // 主体文章向上面移一点 // 更改标题字体为粗体,调大字号 // 把顶栏logo 调暗一些,不要这么跳脱 const css = ` div.post-title > div:nth-child(1){display: none !important;} div.post-title > div.post-content > div:nth-child(1){display: none !important;} div.post-title > div.post-content > span{display: none !important;} div.container{max-width: 980px !important;} div.post{padding: 35px 40px !important;box-shadow: 0 16px 45px rgb(0 0 0 / 15%) !important;} div#header{padding: 0px 0px !important;} div#page-content{padding: 80px 0 50px 0 !important;} h1.title{font-weight: 700 !important;font-size: 28px !important;} h1.logo{opacity: 0.4 !important;} ` GM_addStyle(css); } function weixin() { // 文章正文宽度,阴影,修改padd // 右边二维码移到文章底部 // 更改标题字体大小 const css = ` div.rich_media_area_primary_inner{width: 870px !important;box-shadow: 0 16px 45px rgb(0 0 0 / 15%) !important;padding: 0 40px !important;} div#js_pc_qr_code{position: static !important;} h1#activity-name{font-size: 32px !important;} ` GM_addStyle(css); } })();