魔怔定型文屏蔽器

屏蔽某魔怔定型文

目前为 2021-02-01 提交的版本。查看 最新版本

// ==UserScript==
// @name         魔怔定型文屏蔽器
// @namespace    https://pbb.akioi.ml/ban-shanoa
// @version      0.2
// @description  屏蔽某魔怔定型文
// @author       tiger0132
// @match        https://pbb.akioi.ml/
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    const blockList = ['夏小姐', '夏诺雅', 'シャノア', 'しゃのあ', 'shanoa'];

    var oldFmtFeed = fmtFeed;
    fmtFeed = feed => {
        const content = feed.content_markdown;
        const node = $(oldFmtFeed(feed));

        if (blockList.some(keyword => content.includes(keyword))) {
            node[0].id = `feed-${feed.id}`;
            node[0].style.opacity = 0.3;
            node.hide();
            return `<p style="text-align: center; color: gray; opacity: 0.3; " onclick="$('#feed-${feed.id}').show(); $(this).hide()">隐藏了 ${feed.user.name} 的一条犇犇,点击显示</p>` + node[0].outerHTML;
        } else
            return node[0].outerHTML;
    };
})();

QingJ © 2025

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