网站综合去元素框架

去除网页各种元素

目前為 2024-06-23 提交的版本,檢視 最新版本

// ==UserScript==
// @name         网站综合去元素框架
// @version      24.06.22
// @description  去除网页各种元素
// @author       Geek
// @match        https://*.123pan.com/*
// @match        https://*.bilibili.com/*
// @match        https://yiyan.baidu.com/*
// @match        https://*.baidu.com/*
// @match        https://*.ghxi.com/*
// @match        https://gf.qytechs.cn/*
// @match        *://*/*
// @run-at       document-start
// @namespace https://gf.qytechs.cn/users/1318945
// ==/UserScript==
(function() {
    'use strict';

    // 选择要移除的元素
    const elementsToRemove = [
        /*123云盘*/
        //'div.new-menu-item-image',
        'div.mfy-main-layout__head',//618促销banner
        'img.new-menu-item-image',//同步空间new标签
        'div.activity-box',//618vip促销信息
        'div.sider-member-btn',//618商城信息
        'img.special-menu-item-container-migration--label',//网盘数据转入hot标签

        /*百度网盘*/
        'div.nd-operate-guidance',//开屏
        'span.wp-s-header__vip-btn-tip-text',//优惠红点
        'div.wp-s-header__game-entry.u-popover__reference',//礼物图标
        'sup.u-badge__content.is-dot',//消息红点
        'span.wp-s-header-user__tooltip.wp-header-user__tooltip-display',//开通会员按钮
        'a#web-header-text-s-72.inline-block-v-middle.web-header-ad-item.u-popover__reference',//年中活动
        'p.wp-s-header-user__create-team-title.u-popover__reference',//企业团队
        'div.nd-chat-ai-btn__container',//小助手
        'div.module-device-box.norecognition',//设备管理开屏
        'div.module-device-mask',//开屏全屏蒙版
        'div.module-cardtip-mask',//开屏全屏蒙版
        'div.module-cardtip-box',//卡包开屏
        'div.module-canvas',//共享蒙版
        'div#dialog.dialog-dialog1.guide-share-dir-tip.dialog-gray',//共享开屏
        'span.vip-center-tip',//vip
        'span.newIcon',//红点
        'div.wp-side-options-btn',//企业认证


        /*果核剥壳*/
        'section#modules-13.section.wpcom-modules.modules-tjnr.container',//头图轮换推荐
        'section#modules-27.wpcom-modules.modules-category-posts',//正版特惠
        'section#modules-23.wpcom-modules.modules-image',//提交
        'section#modules-24.wpcom-modules.modules-text',//ai检测
        'section#modules-18.section.wpcom-modules.modules-special',//专题栏目
        'section#modules-26.section.wpcom-modules.modules-carousel-posts',//圈内热点
        'li.item.item-sticky',//最新资源推广
        'div#wpcom-image-ad-11.widget.widget_image_ad',//贴图广告1
        'div#wpcom-image-ad-8.widget.widget_image_ad',//贴图广告2
        'div#wpcom-html-ad-4.widget.widget_html_ad',//贴图广告3
        'div#wpcom-image-ad-10.widget.widget_image_ad',//贴图广告4
        'div#wpcom-image-ad-2.widget.widget_image_ad',//公众号二维码
        'div#wpcom-image-ad-7.widget.widget_image_ad',//激活信息
        'div.action-item.j-share',//分享按钮
        'div.wpcom_ad_wrap',//adguard拦截提示

        /*哔哩哔哩*/
        'img.loc-mc-box__pic',//滚动热点
        'div.loc-mc-box',//滚动热点框
        'a.loc-entry',
        'li.v-popover-wrap.left-loc-entry',//常驻热点
        'a.download-entry.download-client-trigger',//客户端下载按钮
        'div.vip-entry-containter',//账号大会员信息
        'div.vip-wrap',//大会员信息
        'a.download-entry.download-client-trigger',

        /*文心一言*/
        'div.NQlBLxO4',//vip充值
        'div.PB57KCF0',//开通vip的按钮
        'div.ant-tooltip-inner',//会员专享

        /*greasyfork*/

        'div#aswift_3_host',
        'div#aswift_2_host',
        'div#aswift_1_host',
        'div.grippy-host',//底栏广告位
        'div#script-show-info-ad.ad.ad-ga',//底栏广告位
        'ins.adsbygoogle.adsbygoogle-noablate',//底栏广告位
        'div.ns-ipk34-e-1column-container.banner-large-board.flex-filler',//首页底栏广告
        'div.creative.end-card',

    ];

    // 移除元素
    function removeElements() {
        elementsToRemove.forEach(selector => {
            const elements = document.querySelectorAll(selector);
            elements.forEach(element => {
                element.remove();
            });
        });
    }

        // 在页面加载前和加载完成后各执行一次
    setTimeout(removeElements, 500);
    setTimeout(removeElements, 1000);
    setTimeout(removeElements, 1500);
    setTimeout(removeElements, 2500);

    document.addEventListener('DOMContentLoaded', () => {
        removeElements();
    });

    window.addEventListener('load', () => {
        removeElements();
    });



   
  

})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址