Greasy Fork

Greasy Fork is available in English.

『净网卫士』网盘净化

Block advertisements, pop ups, promotions, shopping malls, etc

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name               『净网卫士』网盘净化
// @name:zh-CN         『净网卫士』网盘净化
// @namespace          ttps://github.com/Hunlongyu
// @version            0.0.1
// @author             Hunlongyu
// @description        Block advertisements, pop ups, promotions, shopping malls, etc
// @description:zh-CN  屏蔽广告、弹框、推广、商场等
// @license            MIT
// @copyright          Copyright (c) [2024] [hunlongyu]
// @icon               https://i.loli.net/2019/04/22/5cbd720718fdb.png
// @homepageURL        https://github.com/Hunlongyu/userscript
// @supportURL         https://github.com/Hunlongyu/userscript/issues
// @match              https://www.123pan.com/*
// @match              https://*.lanzoul.com/*
// @match              https://*.lanzouo.com/*
// @match              https://pan.quark.cn/*
// @match              https://pan.baidu.com/*
// @match              https://www.aliyundrive.com/*
// @match              http://ct.ghpym.com/*
// @grant              GM_addStyle
// @run-at             document-start
// ==/UserScript==

(function () {
  'use strict';

  var _GM_addStyle = /* @__PURE__ */ (() => typeof GM_addStyle != "undefined" ? GM_addStyle : void 0)();
  const parseUrl = () => {
    const url = window.location.href;
    if (url.includes("123pan")) {
      runWith123Pan();
    } else if (url.includes("lanzou")) {
      runWithLanzou();
    } else if (url.includes("quark")) {
      runWithQuark();
    } else if (url.includes("baidu")) {
      runWithBaidu();
    } else if (url.includes("aliyundrive")) {
      runWithAliYun();
    } else if (url.includes("ghpym")) {
      runWithGhpym();
    }
  };
  const runWith123Pan = () => {
    const css = `
    .mfy-main-layout__head{display: none !important;}
    .banner-container-pc{display: none !important;}
    /* 手机 */
    .banner-container-h5{display: none !important;}
  `;
    _GM_addStyle(css);
    localStorage.setItem("linearModal", '"off"');
  };
  const runWithLanzou = () => {
    const css = `
    .foot_info{display: none !important;}
  `;
    _GM_addStyle(css);
  };
  const runWithQuark = () => {
    const css = `
    .feature-screen{display: none !important;}
    [class^="DetailLayout--header-wrap"]{display: none !important;}
    .share-right-side-content{display: none !important;}
    [class^="CommonFooter--footer"]{display: none !important;}
    #ice-container{background-color: #f3f6fe;}
    [class^="DetailLayout--content"]{width: 90% !important; max-width: 1280px;}
  `;
    _GM_addStyle(css);
  };
  const runWithBaidu = () => {
    const css = `
    .module-sidebar-business-ad{display: none !important;}
    #bd-main .bd-left{margin: 0 !important;}
    .module-share-footer{display: none !important;}
  `;
    _GM_addStyle(css);
  };
  const runWithAliYun = () => {
    const css = `
    [class^="share-list-banner"]{display: none !important;}
  `;
    _GM_addStyle(css);
  };
  const runWithGhpym = () => {
    const css = `
    [class^="share-list-banner"]{display: none !important;}
    footer{display: none !important;}
    .search-box{display: none !important;}
    `;
    _GM_addStyle(css);
  };
  parseUrl();

})();