屏蔽虎扑网红表情图

屏蔽虎扑网红表情图,屏蔽内容修改脚本添加

目前为 2023-02-11 提交的版本。查看 最新版本

// ==UserScript==
// @name         屏蔽虎扑网红表情图
// @namespace    http://tampermonkey.net/
// @version      0.1
// @license MIT
// @description  屏蔽虎扑网红表情图,屏蔽内容修改脚本添加
// @author       You
// @match        https://bbs.hupu.com/*.html
// @icon         https://www.google.com/s2/favicons?sz=64&domain=hupu.com
// @grant        none
// @require      https://cdn.staticfile.org/jquery/3.4.1/jquery.min.js

// ==/UserScript==


let blacklist = [
"37338109_20210220183736",
"26124659_20220502102437"
];

(function () {
    'use strict';
    $(document).ready(function () {
        $('.image-wrapper').each(function (i, e) {
            //console.log(e);
            $(e).bind("DOMNodeInserted", function () {
                //console.log("change");
                $(e).find("img").each(function (i2, e2) {
                    let src = $(e2).attr("src");
                    for (let black of blacklist) {
                        if (src.includes(black)) {
                            console.log(src);
                            $(e).remove()
                            break;
                        }
                    }
                })
            })
        })
    });

    // Your code here...
})();