// ==UserScript== // @name 去除软件站无用元素 // @namespace http://tampermonkey.net/ // @version 0.35 // @description 去除殁漂遥、果核剥壳、423down、mefcl无用元素 // @author You // @match https://*.mpyit.com/* // @match https://*.ghxi.com/* // @match https://*.423down.com/* // @match https://*.mefcl.com/* // @match https://*.fenxm.com/* // @match https://*.gndown.com/* // @match https://*.osssr.com/* // @match https://*.lsapk.com/* // @grant none // @downloadURL none // ==/UserScript== /* globals jQuery, $, waitForKeyElements */ (function() { 'use strict'; let len, arr, i if (window.location.hostname == "www.mpyit.com") { arr= document.getElementsByClassName("sticky"); for (i = arr.length - 1; i >= 0; i--) { arr[i].remove();//删除类名带sticky的 } //删除leftad.png let bodyElement = document.querySelector('body'); bodyElement.style.backgroundImage = 'none';//body的背景设置为none window.scrollTo(0, 60); window.scrollTo(0, 0); } else if (window.location.hostname == "www.ghxi.com") { window.addAdNote = function() {} //广告提示条 if ($('button.gh-dialog--btn').length) { $('button.gh-dialog--btn').click();// 如果存在,触发点击事件 } arr = document.getElementsByClassName("wpcom_ad_wrap"); for (i = arr.length - 1; i >= 0; i--) { arr[i].remove(); } ["12", "13", "15", "16", "18", "21", "22", "23", "24", "25", "26", "27", "28", "29"].forEach(id => { const obj = document.getElementById(`modules-${id}`); if (obj) { obj.remove();//根据modules id删除元素 } }); arr= document.getElementsByClassName("item-sticky"); for (i = arr.length - 1; i >= 0; i--) { arr[i].remove();//删除类名带item-sticky的 } $('img[src="https://img.lovestu.com/./uploads/2024/09/wetab5.webp"]').each(function() { $(this).parent().remove(); }); } else if (window.location.hostname == "www.423down.com") { let wrapperDiv = $('div.wrapper'); if (wrapperDiv.length) { //删除分类名带推荐的 $(".content-wrap:eq(0) .content ul.excerpt li").each(function() { let catSpan = $(this).find(".info .cat")[0]; if (catSpan.innerHTML.includes("推荐") || catSpan.innerHTML.includes("推广") ) { $(this).remove(); } let titleSpan = $(this).find("h2 a")[0].innerHTML; if (titleSpan.includes("!") || titleSpan.includes("!")) { $(this).remove(); } }); //删除nav里GPT广告 let ulMenu = $('[id="menu-%e9%a1%b6%e9%83%a8%e5%af%bc%e8%88%aa"]') // if (ulMenu.length > 0) { ulMenu.children('li').each(function() { if ($(this).attr('id') && $(this).attr('id').length === 15) { $(this).remove(); } }); } } else { //移动端,删除带 置顶 推广 推荐 关键词的 $('.post-list li:contains("置顶")').remove(); $('.load-more').click(); setTimeout(function() { $('.post-list li:contains("置顶"), .post-list li:contains("推广"), .post-list li:contains("推荐")').remove(); $('.load-more').click(); setTimeout(function() { $('.post-list li:contains("置顶"), .post-list li:contains("推广"), .post-list li:contains("推荐")').remove(); }, 600); }, 600); } //删除文章底部站长推荐 $('img[src="https://www.423down.com/wp-content/themes/D7/img/new.png"]').each(function() { $(this).parent().remove(); }); $('img[src="https://img.alicdn.com/imgextra/i4/1058648503/O1CN01xNg1Yu2CgQa0kJpVt_!!1058648503.png"]').each( function() { $(this).parent().remove(); }); } else if (window.location.hostname == "www.mefcl.com") { $(".content").find("article").each(function() { if ($(this).text().indexOf("合作推荐") !== -1) { $(this).remove(); } }); $(".item-01").empty(); }else if (window.location.hostname == "www.fenxm.com") { $(".content").find("article").each(function() { if ($(this).text().indexOf("置顶") !== -1) { $(this).remove(); } }); $(".swiper-container").remove(); $(".full-pst").remove(); }else if (window.location.hostname == "www.gndown.com") { $(".content").find("article").each(function() { if ($(this).text().indexOf("置顶") !== -1) { $(this).remove(); } }); }else if (window.location.hostname == "www.osssr.com") { $(".content").find("article").each(function() { if ($(this).text().indexOf("置顶") !== -1) { $(this).remove(); } }); $(".excerpt-minic-index").remove(); }else if (window.location.hostname == "www.lsapk.com") { $(".post-list").find("li").each(function() { if ($(this).text().indexOf("置顶") !== -1) { $(this).remove(); } }); $('img[src="https://www.lsapk.com/wp-content/uploads/2024/06/yywx.jpg"]').each(function() { $(this).parent().remove(); }); $(".swiper-container").remove(); } })();