隐藏篱笆社区用户头像等信息

自动隐藏篱笆社区帖子中的所有用户头像等信息

// ==UserScript==
// @name         隐藏篱笆社区用户头像等信息
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  自动隐藏篱笆社区帖子中的所有用户头像等信息
// @author       gfsc
// @match        https://www.libaclub.com/*
// @grant        none
// @license      MIT
// ==/UserScript==

(function() {
    'use strict';

    // 隐藏所有用户头像
    const avatars = document.querySelectorAll('img[src*="avatars.liba.com"]');
    avatars.forEach(avatar => {
        avatar.style.display = 'none';
    });

    // 隐藏来自 iPhone/Android 或 手机版的信息
    const topicUpdatedDivs = document.querySelectorAll('.ui-topic-updated .from-iphone, .ui-topic-updated .from-android');
    topicUpdatedDivs.forEach(div => {
        div.style.display = 'none';
    });

    // 隐藏所有广告链接(class="merchant-link")
    const ads = document.querySelectorAll('.merchant-link');
    ads.forEach(ad => {
        ad.style.display = 'none';
    });

    // 隐藏带有“发送悄悄话”文本的链接
    const messageLinks = document.querySelectorAll('a.fn-link');
    messageLinks.forEach(link => {
        if (link.textContent.includes("发送悄悄话")) {
            link.style.display = 'none';
        }
    });
})();