FA gear

FA enhancement

当前为 2025-02-02 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         FA gear
// @namespace    https://greasyfork.org/en/scripts/525591-fa-gear
// @version      0.11
// @description  FA enhancement
// @author       Boni
// @match        https://www.furaffinity.net/*
// @grant        none
// @license      GPL-3.0-or-later
// @icon         https://www.google.com/s2/favicons?sz=64&domain=furaffinity.net
// ==/UserScript==


(function() {
    'use strict';

    window.addEventListener("load", function() {
        document.querySelectorAll(".notifications-by-date").forEach(section => {
            let images = section.querySelectorAll("figure");
            let blockedImages = section.querySelectorAll("img.blocked-content");

            if (images.length === blockedImages.length) {
                // Remove the entire section if all images are blocked
                section.remove();
            } else if (blockedImages.length === 1) {
                // Remove the single blocked image if only one is blocked
                blockedImages[0].closest("figure").remove();
            }
        });

        document.querySelectorAll(".section-body").forEach(section => {
            section.querySelectorAll("figure").forEach(figure => {
                if (figure.querySelector("img.blocked-content")) {
                    figure.remove();
                }
            });
        });
    });
})();