Greasy Fork is available in English.
页面精简去推广内容只留主内容,卡饭自动签到
当前为
// ==UserScript==
// @name zd423|吾爱|果核|卡饭|殁漂遥 精简去推广
// @namespace http://tampermonkey.net/
// @version 0.5
// @description 页面精简去推广内容只留主内容,卡饭自动签到
// @author You
// @match http://bbs.zhiyoo.net/search.php?mod=forum&adv=yes
// @match https://www.423down.com/
// @match https://www.52pojie.cn/search.php*
// @match https://www.52pojie.cn/forum*
// @match https://www.ghpym.com/
// @match https://www.ghpym.com/?btwaf*
// @match https://bbs.kafan.cn/forum-65-1.html
// @match https://www.mpyit.com/
// @match https://www.mpyit.com/?btwaf*
// @namespace https: //greasyfork.org/zh-CN/scripts/417544
// @grant none
// ==/UserScript==
(function () {
'use strict';
//每次进入前清除控制台信息
console.clear();
var url = window.location.href;
//去除zd置顶推广内容
if (url == 'https://www.423down.com/') {
var excerpt = document.getElementsByClassName('excerpt')[0];
excerpt.children[0].style.display = 'none';
excerpt.children[1].style.display = 'none';
}
//智友搜索按发布时间排序
else if (url.indexOf('http://bbs.zhiyoo.net/search') != -1) {
var order = document.getElementById('orderby1');
if (order != null) {
order.options[1].selected = true;
}
}
//吾爱搜索按发布时间排序
else if (url.indexOf('/www.52pojie.cn/search') != -1) {
document.getElementById('orderby1').options[1].selected = true;
}
//去除所有官方置顶帖子
else if (url.indexOf('52pojie.cn/forum') != -1) {
var sp = document.querySelector("#separatorline");
var parent = document.querySelector("#threadlisttableid").children;
var n = 0;
while (sp = sp.previousElementSibling) {
n++;
}
for (; n > -1; n--) {
parent[n].remove();
}
}
//去除果核置顶推广内容,精简页面无用内容
else if (url == 'https://www.ghpym.com/' || url.indexOf('://www.ghpym.com/?btwaf') != -1) {
var se = document.querySelectorAll('section');
for (var i = 1; i < 4; i++) {
se[i].style.display = 'none';
}
var top = document.querySelectorAll('.sticky-post');
for (i = 0; i < top.length; i++) {
top[i].parentNode.parentNode.parentNode.parentNode.style.display = 'none';
}
}
//卡饭自动签到,只去除软件下载板块的版规和一个无用置顶内容
else if (url.indexOf('https://bbs.kafan.cn/forum-65-1.html') != -1) {
document.querySelector('.comeing_box').style.display = 'none';
document.querySelectorAll('.bm')[2].style.display = 'none';
document.getElementById('threadlisttableid').children[0].style.display = 'none';
//签到
if (document.querySelector("#pper_b").style.display == 'none') {
document.querySelector("#pper_a").click();
}
}
//去除殁漂遥主页置顶推广和其他无用内容
else if (url == 'https://www.mpyit.com/' || url.indexOf('www.mpyit.com/?btwaf') != -1) {
document.getElementById('playBax').style.display = 'none';
document.getElementById('sidebar').style.display = 'none';
var post = document.getElementById('post');
post.style.marginLeft = "15%";
var ch = post.children;
for (let i = 2; i < 6; i++) {
ch[i].style.display = 'none';
}
}
})();