Greasy Fork is available in English.
去除殁漂遥、果核剥壳无用元素
当前为
// ==UserScript==
// @name 去除软件站无用元素
// @namespace http://tampermonkey.net/
// @version 0.1
// @description 去除殁漂遥、果核剥壳无用元素
// @author You
// @match https://www.mpyit.com/*
// @match https://*.ghxi.com/*
// @grant none
// ==/UserScript==
/* globals jQuery, $, waitForKeyElements */
(function() {
'use strict';
let len, arr, i
if (window.location.hostname == "www.mpyit.com") {
len = document.getElementsByClassName("post-0").length
for (i = 0; i < len; i++) {
document.getElementsByClassName("post-0")['0'].remove()
}
for (i=0;i<4;i++){//广告条数
if ($("#post div:first").next()[0].classList.length==1){
$("#post div:first").next().remove()
}
}
len = document.getElementsByClassName("category-zhengban").length
for (i = 0; i < len; i++) {
document.getElementsByClassName("category-zhengban")['0'].remove()
}
len = document.getElementsByClassName("widget").length
for(i = 0; i < len; i++) {
if (document.getElementsByClassName("widget")[i].offsetHeight!=0){
document.getElementsByClassName("widget")[i].getElementsByTagName("h3")[0].remove();
document.getElementsByClassName("widget")[i].getElementsByClassName("box")[0].remove();
}
}
window.scrollTo(0,40);
} else if (window.location.hostname == "www.ghxi.com") {
window.addAdNote = function() {} //广告提示条
len = document.getElementsByClassName("wpcom_ad_wrap").length
for (i = 0; i < len; i++) {
document.getElementsByClassName("wpcom_ad_wrap")['0'].remove()
}
arr = new Array("12", "13", "15", "16", "18", "21", "22", "23","24")
for (i = 0; i < arr.length; i++) {
let obj = document.getElementById("modules-" + arr[i]);
if (obj) {
obj.remove();
}
}
len = document.getElementsByClassName("item-sticky").length
for (i = 0; i < len; i++) {
document.getElementsByClassName("item-sticky")['0'].remove()
}
}
console.clear()
})();