(function () {
"use strict";
const websites = [
{
name: "CSDN",
url: "blog.csdn.net",
handles: [
{
type: "click",
item: ".hide-preCode-bt",
},
{
type: "display",
item: ".hide-article-box",
},
{
type: "display",
item: ".btn_mod",
},
{
type: "height",
item: ".article_content",
},
{
type: "display",
item: ".readall_box",
},
{
type: "click",
item: ".btn_comment_readmore",
},
],
},
{
name: "CSDN问答",
url: "ask.csdn.net/questions",
handles: [
{
type: "display",
item: ".expandBtn",
},
{
type: "height",
item: ".normal-style",
},
{
type: "click",
item: ".ic_ask_down_reeow",
},
],
},
{
name: "CSDN下载",
url: "download.csdn.net/download",
handles: [
{
type: "click",
item: ".fl",
},
{
type: "click",
item: ".unfold-font",
},
{
type: "click",
item: ".el-button--text",
},
],
},
{
name: "CSDN文库",
url: "wenku.csdn.net/answer/",
handles: [
{
type: "click",
item: ".text-all",
},
],
},
{
name: "it1352",
url: "it1352.com",
handles: [
{
type: "display",
item: ".arc-body-main-more",
},
{
type: "height",
item: ".arc-body-main",
},
],
},
{
name: "编程之家",
url: "jb51.cc",
handles: [
{
type: "display",
item: "#read-more-wrap",
},
{
type: "height",
item: "#container",
},
{
type: "height",
item: ".read-more-hidden",
},
],
},
{
name: "简书",
url: "jianshu.com/p",
handles: [
{
type: "display",
item: ".collapse-tips",
},
{
type: "height",
item: ".collapse-free-content",
},
{
type: "overflow",
item: "body",
},
],
fun: function () {
let css = document.createElement("style");
css.innerText = ".collapse-free-content::after {height: 0px !important}";
document.head.appendChild(css);
},
},
{
name: "知乎",
url: "www.zhihu.com/question",
handles: [
{
type: "display",
item: ".ContentItem-rightButton",
},
{
type: "height",
item: ".RichContent-inner--collapsed",
},
],
fun: function () {
let css = document.createElement("style");
css.innerText += ".RichContent--unescapable.is-collapsed .RichContent-inner {mask-image: unset !important;}";
css.innerText += ".RichContent.is-collapsed {cursor: unset !important;}";
document.head.append(css);
},
},
{
name: "百度经验",
url: "jingyan.baidu.com/article",
handles: [
{
type: "display",
item: ".read-whole-mask",
},
{
type: "height",
item: ".exp-content-container",
},
{
type: "click",
item: ".more-img-opt",
},
],
},
{
name: "百度知道",
url: "zhidao.baidu.com/question",
handles: [
{
type: "display",
item: ".w-detail-display-btn",
},
{
type: "height",
item: ".w-detail-container",
},
{
type: "display",
item: ".wgt-best-mask",
},
{
type: "height",
item: ".best-text",
},
{
type: "display",
item: ".wgt-answers-mask",
},
{
type: "height",
item: ".answer-text",
},
{
type: "display",
item: "#show-hide-container",
},
{
type: "classList",
item: ".answer",
remove: "answer-hide",
},
{
type: "display",
item: ".show-answer-dispute",
},
{
type: "classList",
item: ".answer",
remove: "answer-dispute-hide",
},
],
},
{
name: "百度百科",
url: "baike.baidu.com/item",
handles: [
{
type: "click",
item: ".layout-icons_down-arrow",
},
{
type: "display",
item: "#ui_refresh_down",
},
],
fun: function () {
let button = document.querySelector(".yx-load-more-inner");
button.dispatchEvent(new Event("tap"));
},
},
{
name: "百度贴吧",
url: "tieba.baidu.com/p",
handles: [
{
type: "display",
item: ".replace_tip",
},
{
type: "height",
item: ".replace_div",
},
{
type: "click",
item: ".j_lzl_m",
},
],
},
{
name: "百度文库手机版1",
url: "wk.baidu.com/view",
handles: [
{
type: "height",
item: ".reader-copy",
},
{
type: "display",
item: ".blur-bg",
},
],
fun: function () {
let item = document.querySelector(".fold-pager");
if (item) {
item.style.setProperty("margin-top", "0px");
}
},
},
{
name: "百度文库手机版2",
url: "tanbi.baidu.com/h5apptopic/browse/",
handles: [
{
type: "display",
item: ".continue-read-wrap",
},
],
fun: function () {
let item = document.querySelector("#read-view");
item.setAttribute("scrolling", "yes");
},
},
{
name: "百家题库",
url: "easylearn.baidu.com/edu-page/",
handles: [
{
type: "display",
item: ".shiti-answer .mask",
},
{
type: "height",
item: ".shiti-answer .analysis-text",
},
{
type: "height",
item: ".question-cont .tigan",
},
{
type: "height",
item: ".question-cont .tigan .mask",
},
],
},
{
name: "百家号",
url: "baijiahao.baidu.com/s",
handles: [
{
type: "display",
item: ".oPadding",
},
{
type: "height",
item: ".mainContent",
},
{
type: "height",
item: "#mainContentContainer",
},
{
type: "display",
item: ".foldMaskWrapper",
},
],
},
{
name: "百度新闻",
url: "mbd.baidu.com/newspage/data",
handles: [
{
type: "display",
item: "[class^=foldMaskWrapper-]",
},
{
type: "height",
item: "#dynamicItem",
},
{
type: "display",
item: ".foldMaskWrapper",
},
{
type: "height",
item: "#mainContentContainer",
},
],
},
{
name: "新浪新闻",
url: "sina.cn",
handles: [
{
type: "display",
item: ".look_more",
},
{
type: "height",
item: ".s_card",
},
],
},
{
name: "网易新闻",
url: "3g.163.com",
handles: [
{
type: "display",
item: ".show_article",
},
{
type: "height",
item: "article",
},
],
},
{
name: "搜狐新闻",
url: "sohu.com/a",
handles: [],
fun: function () {
onload = function () {
let item = document.querySelector("#artLookAll");
item.click();
clearInterval(interval);
};
},
},
{
name: "腾讯新闻",
url: "view.inews.qq.com/",
handles: [
{
type: "display",
item: "[class^=show-more_outer__]",
},
{
type: "display",
item: "[class^=show-more-article_cover__]",
},
{
type: "height",
item: "[class^=show-more_height-not-full__]",
},
],
},
{
name: "凤凰新闻",
url: "ifeng.com/",
handles: [
{
type: "display",
item: "[class^=index_more_]",
},
{
type: "display",
item: "[class^=index_tip_",
},
{
type: "height",
item: "[class^=index_main_content_]",
},
{
type: "display",
item: ".showall",
},
{
type: "height",
item: ".article",
},
{
type: "display",
item: "[class^=more]",
},
{
type: "height",
item: "[class^=main_content]",
},
{
type: "click",
item: "[class^=index_videoBrefTextBtn_]",
},
],
},
{
name: "澎湃新闻",
url: "m.thepaper.cn/newsDetail_forward",
handles: [
{
type: "display",
item: "#clickForMore",
},
{
type: "height",
item: ".newsdetail_body",
},
],
},
{
name: "新京报",
url: "m.bjnews.com.cn/detail/",
handles: [
{
type: "display",
item: ".shade",
},
{
type: "height",
item: ".article",
},
],
},
{
name: "央广网",
url: "cnr.cn",
handles: [
{
type: "display",
item: "#readmore",
},
{
type: "height",
item: "#perny-main",
},
],
},
{
name: "环球网1",
url: "huanqiu.com/article/",
handles: [
{
type: "click",
item: ".unfold-btn",
},
],
},
{
name: "环球网2",
url: "3w.huanqiu.com/a/",
handles: [
{
type: "click",
item: "#more",
},
],
},
{
name: "中华网",
url: "3g.china.com/act/",
handles: [
{
type: "display",
item: "#js-continue-reading",
},
{
type: "height",
item: "#artiCon",
},
],
},
{
name: "今日头条:移动版",
url: "m.toutiao.com/article/",
handles: [
{
type: "display",
item: ".toggle-button-container",
},
{
type: "display",
item: ".content-shadow",
},
{
type: "height",
item: ".content",
},
],
},
{
name: "东方资讯",
url: "mini.eastday.com/",
handles: [
{
type: "display",
item: ".Unfolded-btn",
},
{
type: "height",
item: ".article-content",
},
],
},
{
name: "丁香园",
url: "dxy.cn",
handles: [
{
type: "height",
item: ".dicussion-text",
},
{
type: "display",
item: "[class^=contentWrapBottom___]",
},
{
type: "height",
item: "[class^=contentWrap___]",
},
{
type: "display",
item: ".show-all",
},
{
type: "height",
item: ".article__content",
},
],
},
{
name: "健康界",
url: "www.cn-healthcare.com/",
handles: [
{
type: "display",
item: ".mask",
},
{
type: "height",
item: "#artbody",
},
],
},
{
name: "有来医生",
url: "m.youlai.cn/",
handles: [
{
type: "display",
item: ".showBtn--nqouA",
},
{
type: "height",
item: ".show-more",
},
],
},
{
name: "B站动态",
url: "space.bilibili.com/",
handles: [],
fun: function () {
let item1s = document.querySelectorAll(".folded");
for (let item of item1s) {
item.className = "bili-rich-text__content";
}
let item2s = document.querySelectorAll(".bili-rich-text__action");
for (let item2 of item2s) {
item2.innerText = "收起";
}
},
},
{
name: "B站专栏",
url: "www.bilibili.com/read/mobile",
handles: [
{
type: "display",
item: ".read-more",
},
{
type: "classList",
item: ".read-article-box",
remove: "limit",
},
{
type: "classList",
item: ".read-article-box",
remove: "show-later",
},
],
},
{
name: "B站笔记",
url: "m.bilibili.com/opus/",
handles: [
{
type: "display",
item: ".opus-read-more",
},
{
type: "classList",
item: ".opus-module-content",
remove: "limit",
},
],
},
{
name: "微博文章PC版",
url: "weibo.com/ttarticle/p/show?id=",
handles: [
{
type: "height",
item: ".WB_editor_iframe_new",
},
{
type: "display",
item: ".btn_line",
},
],
},
{
name: "豆瓣",
url: "douban.com",
handles: [
{
type: "display",
item: ".oia-readall",
},
{
type: "height",
item: ".note-content",
},
],
fun: function () {
let item1 = document.querySelector(".subject-intro p");
try {
let str = item1.getAttribute("data-content");
if (str) {
item1.innerText = str;
}
} catch (error) {
}
onload = function () {
let items2 = document.querySelectorAll(".LinesEllipsis-readmore");
for (let item of items2) {
item.click();
}
let items3 = document.querySelectorAll(".expand,.a_show_full,.fold-switch");
for (let item of items3) {
item.click();
}
};
},
},
{
name: "开源中国",
url: "www.oschina.net/p/",
handles: [
{
type: "display",
item: ".collapse-bar",
},
{
type: "height",
item: ".article-detail",
},
],
},
{
name: "阿里云开发者社区",
url: "developer.aliyun.com/article",
handles: [
{
type: "height",
item: ".article-hide-content",
},
{
type: "display",
item: ".article-hide-box",
},
],
},
{
name: "腾讯云开发者社区",
url: "cloud.tencent.com/developer/article/",
handles: [
{
type: "height",
item: ".com-markdown-collpase-main",
},
{
type: "display",
item: ".com-markdown-collpase-toggle",
},
{
type: "height",
item: ".cdc-expand-area__main",
},
{
type: "display",
item: ".cdc-expand-area__toggle",
},
],
},
{
name: "华为云开发者社区",
url: "huaweicloud.csdn.net/",
handles: [
{
type: "height",
item: ".user-article",
},
{
type: "display",
item: ".article-show-more",
},
],
},
{
name: "360图书馆手机版",
url: "www.360doc.cn/article/",
handles: [
{
type: "display",
item: ".article_showall",
},
{
type: "height",
item: ".article",
},
],
},
{
name: "360图书馆PC版",
url: "www.360doc.com/content/",
handles: [
{
type: "classList",
item: "body",
remove: "articleMaxH",
},
],
},
{
name: "太平洋电脑网",
url: "g.pconline.com.cn/x/",
handles: [
{
type: "display",
item: ".show_article",
},
{
type: "height",
item: ".art-content",
},
],
},
{
name: "中关村在线",
url: "m.zol.com.cn/article/",
handles: [
{
type: "display",
item: ".unfold-article-btn",
},
{
type: "height",
item: ".article-content",
},
],
},
{
name: "汽车之家:新闻",
url: "m.autohome.com.cn/news/",
handles: [
{
type: "display",
item: "#continue_reading",
},
{
type: "classList",
item: "#content .fn-hide",
remove: "fn-hide",
},
],
},
{
name: "汽车之家:车家号",
url: "chejiahao.m.autohome.com.cn/info/",
handles: [
{
type: "display",
item: "#continue_reading_new",
},
{
type: "classList",
item: ".pgc-details .fn-hide",
remove: "fn-hide",
},
],
},
{
name: "汽车之家:论坛",
url: "club.m.autohome.com.cn/bbs/",
handles: [
{
type: "display",
item: "#continue_reading",
},
{
type: "height",
item: "#topicContentSection",
},
{
type: "classList",
item: "#topicContentSection .fn-hide",
remove: "fn-hide",
},
],
},
{
name: "游侠网",
url: "3g.ali213.net",
handles: [
{
type: "display",
item: ".read-all-con",
},
{
type: "display",
item: ".read-all-con2",
},
{
type: "height",
item: ".detail-content",
},
],
},
{
name: "游民星空",
url: "wap.gamersky.com/",
handles: [
{
type: "display",
item: ".gsAreaContextOpen",
},
{
type: "height",
item: "#gsAreaContext",
},
],
},
{
name: "网易大神",
url: "m.ds.163.com/",
handles: [
{
type: "display",
item: ".feed-page-main-controller",
},
{
type: "height",
item: ".feed-page__main-content",
},
],
},
{
name: "360文档",
url: "wenda.so.com/q/",
handles: [
{
type: "display",
item: ".answer-part__has-folder__btn",
},
{
type: "height",
item: ".answer-part__has-folder",
},
{
type: "display",
item: ".js-unfold-page",
},
{
type: "classList",
item: ".hide.js-unfold-answer.answer-fold-box",
remove: "hide",
},
{
type: "display",
item: ".overflow-cover",
},
{
type: "height",
item: ".max-height",
},
{
type: "display",
item: ".js-rest-icon",
},
{
type: "classList",
item: ".ans-box.hide",
remove: "hide",
},
],
},
{
name: "天眼查",
url: "n.tianyancha.com/content",
handles: [
{
type: "display",
item: "[class^=index_other-content-more__]",
},
{
type: "height",
item: "[class^=index_other-content-container__]",
},
],
},
{
name: "天涯社区",
url: "bbs.tianya.cn/m/",
handles: [
{
type: "display",
item: ".openFullPost",
},
{
type: "height",
item: ".onhide",
},
],
fun: function () {
let css = document.createElement("style");
css.innerHTML = ".item-lz .bd.onhide:before{content:none}";
document.head.append(css);
},
},
{
name: "新浪财经",
url: "cj.sina.cn/article/",
handles: [
{
type: "display",
item: ".unfold-box",
},
{
type: "height",
item: ".main-body",
},
],
},
{
name: "东方财富网",
url: "wap.eastmoney.com/a/",
handles: [
{
type: "display",
item: ".fold-btn",
},
{
type: "display",
item: ".fold-arrow",
},
{
type: "height",
item: "#articleContent",
},
{
type: "display",
item: ".fold-mask",
},
],
},
{
name: "东方财富网:社区",
url: "emcreative.eastmoney.com/",
handles: [
{
type: "display",
item: ".my_ad_wrap",
},
{
type: "height",
item: "#text-content",
},
],
},
{
name: "东方财富网:股吧",
url: "mguba.eastmoney.com/",
handles: [
{
type: "display",
item: "#foldup_box",
},
{
type: "height",
item: "#content",
},
],
},
{
name: "喜马拉雅",
url: "www.ximalaya.com/",
handles: [
{
type: "display",
item: ".more-intro-wrapper",
},
{
type: "height",
item: ".layout-main div>article",
},
],
},
{
name: "喜马拉雅",
url: "m.ximalaya.com/",
handles: [
{
type: "height",
item: ".stretch-box",
},
],
fun: function () {
onload = function () {
let item1 = document.querySelector(".stretch-more");
let item2 = item1.parentElement;
item2.remove();
};
},
},
{
name: "古诗文网",
url: "www.gushiwen.cn/",
handles: [],
fun: function () {
let item1s = document.evaluate("//a[contains(text(), '阅读全文')]", document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
for (let i = 0; i < item1s.snapshotLength; i++) {
item1s.snapshotItem(i).click();
}
clearInterval(interval);
},
},
{
name: "淘嘟嘟",
url: "www.taodudu.cc/news/",
handles: [
{
type: "display",
item: "#vip",
},
{
type: "height",
item: "#article_content",
},
],
},
{
name: "代码随想录",
url: "programmercarl.com/",
handles: [
{
type: "display",
item: "#read-more-wrap",
},
{
type: "height",
item: "#container",
},
],
},
{
name: "程序猿DD",
url: "blog.didispace.com",
handles: [
{
type: "display",
item: "#read-more-wrap",
},
{
type: "height",
item: ".article",
},
],
},
{
name: "好网角收藏夹",
url: "wang1314.com/doc",
handles: [
{
type: "display",
item: "#show_content_bar",
},
{
type: "height",
item: "#art_body",
},
{
type: "display",
item: "#show_content_bar",
},
{
type: "height",
item: "#body_content",
},
],
},
{
name: "科中资源网",
url: "k4china.com",
handles: [
{
type: "click",
item: ".readmore",
},
],
},
{
name: "tofacebook",
url: "www.tofacebook.com",
handles: [
{
type: "height",
item: ".panel-default",
},
{
type: "display",
item: ".more-box",
},
],
},
];
let time = 0;
let interval = setInterval(() => {
if (++time == 100) {
clearInterval(interval);
}
for (let website of websites) {
if (location.href.indexOf(website.url) != -1) {
if (website.fun) {
website.fun();
}
for (let handle of website.handles) {
let items = document.querySelectorAll(handle.item);
if (items.length != 0) {
if (handle.type == "display") {
for (let item of items) {
item.style.display = "none";
}
} else if (handle.type == "height") {
for (let item of items) {
item.style.setProperty("height", "unset", "important");
item.style.setProperty("min-height", "unset", "important");
item.style.setProperty("max-height", "unset", "important");
}
} else if (handle.type == "overflow") {
for (let item of items) {
item.style.setProperty("overflow", "unset", "important");
}
} else if (handle.type == "classList") {
for (let item of items) {
item.classList.remove(handle.remove);
}
} else if (handle.type == "click") {
for (let item of items) {
if (item != null && item.getAttribute("opened") != "yes") {
item.click();
item.setAttribute("opened", "yes");
}
}
} else {
for (let item of items) {
if (item) {
item.click();
}
}
}
}
}
}
}
}, 100);
})();