Greasy Fork

Greasy Fork is available in English.

移除蝦皮廣告

移除蝦皮廣告,移除那些容易誤點的廣告,避免使用者誤點商品。

当前为 2023-09-30 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         移除蝦皮廣告
// @version      1.2.0
// @description  移除蝦皮廣告,移除那些容易誤點的廣告,避免使用者誤點商品。
// @author       Danny H.
// @match        https://shopee.tw/*
// @icon         https://freepngimg.com/save/109004-shopee-logo-free-transparent-image-hq/128x128
// @grant        GM_addStyle
// @license      MIT
// @require      https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js
// @namespace    http://greasyfork.icu/users/1166167
// ==/UserScript==
(function() {
    'use strict';
    const removead = setInterval(() => {
        // 使用 :contains 選擇器來選取包含 'Ad' 或 '廣告' 的元素
        const $ads = $(':contains("AD"), :contains("廣告")');

        $ads.each(function() {
            $(this).closest('.col-xs-2-4.shopee-search-item-result__item').hide();
            $(this).closest('.shopee_ic').hide();

        });

        // 隱藏 shopee-header-section shopee-header-section--simple
        const $header = $('.shopee-header-section.shopee-header-section--simple');
        $header.remove();

    }, 500); // 每 500 毫秒執行一次

    // 應對網址變更
    window.addEventListener('locationchange', removead);
})();