🤯 创作初衷:为了我的乳腺/前列腺健康
是不是每天打开论坛,心情本来挺好,结果刷到第 3 个“打卡注册甲骨文(总是浪费我们10分钟时间)”的时候眉头开始紧锁?刷到第 10 个“溢价3000出xxx”的时候血压开始升高?

又或者,总有那么一两个 ID,不管什么帖子下面都有他,杠得你头皮发麻,看着心烦,不看又关不掉?

为了大家的身心健康,为了让论坛回归清净,这款插件诞生了! 它的核心哲学只有一个:眼不见为净,看见喜欢的要高亮!


🛠️ 它能干什么?(功能太强,低调使用)

1. 🚫 “灭霸响指”模式(屏蔽功能)

  • UID 精准核打击:有些讨人厌的家伙喜欢改名?没用!本插件直接锁定他的 UID(身份证号)。只要进了你的黑名单,他就算改名叫“吴彦祖”也得在你的页面上消失。
  • 关键词地图炮:不想看“出机”?不想看“回血”?不想看某个特定商家的名字?
    • 支持普通关键词(比如 baidu),大小写通杀。
    • 支持 正则表达式(高端玩家专用),想屏蔽所有“【.*】”开头的标题?一行代码教做人。

2. ✨ “大佬请喝茶”模式(高亮关注)

  • 老婆/大佬专属色:怕错过了技术大佬的干货?还是怕错过了富哥的 T楼抽奖
    • 把他们的 UID 扔进关注列表,直接给他上个 “土豪金” 或 “猛男粉” 的颜色。
    • 在一堆黑白灰的帖子里,你关注的人就像黑夜里的萤火虫,那么鲜明,那么出众。

🎨 傻瓜式 UI,比某微还要好用

  • 拖拽窗口:设置面板挡住你看帖了?按住标题栏,随便拖! 想扔哪就扔哪。

  • 原生调色板:不想手动输色号?直接点击色块弹出调色板,想要什么五彩斑斓的黑,自己选。

  • 不分大小写:Baidu、BAIDU、baidu... 无论商家怎么变着花样写,插件统一按小写处理,一个都跑不掉。


🧐 为什么你需要它?

  • 因为你的时间很值钱:不要浪费生命在划过那 99% 的重复内容上。

  • 因为你的心情很重要:把那些“杠精”和“复读机”关进小黑屋,世界瞬间清静了。

  • 因为你不想错过福利:第一时间发现大佬的帖子,抢沙发、中大奖,快人一步。

👇 立即安装
别犹豫了,装上它,让你的 NodeSeek 变成真正属于你的 “NodeSeek Pro Max Ultra” 版!


(P.S. 本插件纯本地运行,你的屏蔽列表只有天知地知你知插件知,请放心食用。)



// ==UserScript==// @name         NodeSeek 超级增强:帖子与评论屏蔽// @namespace    http://tampermonkey.net/// @version      1.0// @description  全站净化:支持屏蔽帖子标题、帖子作者、评论内容、评论作者。支持拖拽面板、调色板、多行输入。// @author       Gemini&NodeSeek:@xiaoyang// @match        https://www.nodeseek.com/*// @grant        GM_setValue// @grant        GM_getValue// @run-at       document-end// ==/UserScript==(function() {    'use strict';    // --- 初始化配置 ---    let config = GM_getValue('ns_enhanced_config', {        block: { uids: [], keys: [] },        follow: { uids: [], keys: [] },        style: { titleColor: '#ff0000', bgColor: '#fff9db' }    });    const parseInput = (text) => text.split(/[,\n]/).map(s => s.trim()).filter(s => s.length > 0);    // --- 核心匹配逻辑 ---    const checkMatch = (text, uid, targetConfig) => {        // 1. 检查 UID        if (uid && targetConfig.uids.includes(uid)) return true;        // 2. 检查文本内容 (标题或评论)        if (!text) return false;        const lowerText = text.toLowerCase();        return targetConfig.keys.some(pattern => {            try {                // 正则匹配                if (pattern.startsWith('/') && pattern.lastIndexOf('/') > 0) {                    const lastSlash = pattern.lastIndexOf('/');                    const reg = new RegExp(pattern.substring(1, lastSlash), pattern.substring(lastSlash + 1) + 'i');                    return reg.test(text);                }                // 普通字符串匹配                return lowerText.includes(pattern.toLowerCase());            } catch (e) {                return lowerText.includes(pattern.toLowerCase());            }        });    };    const applyLogic = () => {        const posts = document.querySelectorAll('.post-list-item');        posts.forEach(item => {            const userLink = item.querySelector('.info-author a');            const titleLink = item.querySelector('.post-title a');            if (!userLink || !titleLink) return;            const uidMatch = userLink.getAttribute('href').match(/\/space\/(\d+)/);            const uid = uidMatch ? uidMatch[1] : null;            const titleText = titleLink.textContent.trim();            // 帖子屏蔽            if (checkMatch(titleText, uid, config.block)) {                item.style.setProperty('display', 'none', 'important');                return;            } else {                item.style.display = '';            }            // 帖子高亮            if (checkMatch(titleText, uid, config.follow)) {                item.style.setProperty('background-color', config.style.bgColor, 'important');                titleLink.style.setProperty('color', config.style.titleColor, 'important');                titleLink.style.setProperty('font-weight', 'bold', 'important');            } else {                item.style.backgroundColor = '';                titleLink.style.color = '';                titleLink.style.fontWeight = '';            }        });        const comments = document.querySelectorAll('li.content-item');        comments.forEach(item => {            // 避免重复处理或处理已隐藏的            // if (item.dataset.processed === 'true') return;            const authorLink = item.querySelector('.author-name');            const contentEl = item.querySelector('.post-content');            if (!authorLink) return;            const uidMatch = authorLink.getAttribute('href').match(/\/space\/(\d+)/);            const uid = uidMatch ? uidMatch[1] : null;            const contentText = contentEl ? contentEl.textContent.trim() : "";            // 评论屏蔽            if (checkMatch(contentText, uid, config.block)) {                item.style.setProperty('display', 'none', 'important');                return;            } else {                item.style.display = '';            }            // 评论高亮            if (checkMatch(contentText, uid, config.follow)) {                item.style.setProperty('background-color', config.style.bgColor, 'important');                // 评论区没有标题,我们将用户名染成“标题色”以示区分                authorLink.style.setProperty('color', config.style.titleColor, 'important');                authorLink.style.setProperty('font-weight', 'bold', 'important');            } else {                item.style.backgroundColor = '';                authorLink.style.color = '';                authorLink.style.fontWeight = '';            }        });    };    // --- UI 构建 ---    const createUI = () => {        if (document.getElementById('ns-config-btn')) return;        const btn = document.createElement('div');        btn.id = 'ns-config-btn';        btn.innerHTML = '⚙️ 插件设置';        Object.assign(btn.style, {            position: 'fixed', bottom: '80px', right: '20px', zIndex: '9999',            padding: '8px 15px', backgroundColor: '#333', color: 'white',            borderRadius: '20px', cursor: 'pointer', fontSize: '12px', boxShadow: '0 2px 8px rgba(0,0,0,0.3)'        });        document.body.appendChild(btn);        const panel = document.createElement('div');        panel.id = 'ns-config-panel';        Object.assign(panel.style, {            display: 'none', position: 'fixed', top: '20%', left: '35%',            width: '400px', backgroundColor: '#fff', borderRadius: '12px',            boxShadow: '0 10px 40px rgba(0,0,0,0.2)', zIndex: '10000',            fontFamily: 'sans-serif', overflow: 'hidden'        });        const areaStyle = "width:100%; min-height:100px; margin:5px 0; border:1px solid #ddd; border-radius:4px; padding:8px; font-size:13px; resize:vertical; box-sizing:border-box; background:#fff;";        const labelHint = '<span style="font-weight:normal; font-size:11px; color:#999; margin-left:5px;">(帖子 & 评论通用)</span>';        panel.innerHTML = `            <div id="ns-drag-handle" style="background:#f4f4f5; padding:12px; cursor:move; border-bottom:1px solid #eee; display:flex; justify-content:space-between; align-items:center;">                <strong style="color:#333">NodeSeek 全站净化</strong>                <span id="ns-close-x" style="cursor:pointer; font-size:18px;">&times;</span>            </div>            <div style="display:flex; background:#fafafa; border-bottom:1px solid #eee;">                <div class="ns-tab" data-tab="block" style="flex:1; padding:10px; text-align:center; cursor:pointer; border-bottom:2px solid #d93025; color:#d93025; font-weight:bold;">屏蔽列表</div>                <div class="ns-tab" data-tab="follow" style="flex:1; padding:10px; text-align:center; cursor:pointer; color:#666;">关注高亮</div>                <div class="ns-tab" data-tab="style" style="flex:1; padding:10px; text-align:center; cursor:pointer; color:#666;">外观设置</div>            </div>            <div style="padding:15px; max-height:400px; overflow-y:auto;">                <div id="tab-block" class="ns-tab-content">                    <label style="font-size:12px; font-weight:bold; color:#d93025;">🚫 屏蔽 UID ${labelHint}</label>                    <textarea id="in-b-uids" placeholder="不想看的人的UID,如: 0000" style="${areaStyle}">${config.block.uids.join('\n')}</textarea>                    <label style="font-size:12px; font-weight:bold; color:#d93025;">🚫 屏蔽关键词 ${labelHint}</label>                    <textarea id="in-b-keys" placeholder="不想看的词,如: 晚高峰, 探针" style="${areaStyle}">${config.block.keys.join('\n')}</textarea>                </div>                <div id="tab-follow" class="ns-tab-content" style="display:none;">                    <label style="font-size:12px; font-weight:bold; color:#188038;">⭐ 关注 UID ${labelHint}</label>                    <textarea id="in-f-uids" placeholder="关注的好友 UID" style="${areaStyle}">${config.follow.uids.join('\n')}</textarea>                    <label style="font-size:12px; font-weight:bold; color:#188038;">⭐ 关注关键词 ${labelHint}</label>                    <textarea id="in-f-keys" placeholder="想关注的内容" style="${areaStyle}">${config.follow.keys.join('\n')}</textarea>                </div>                <div id="tab-style" class="ns-tab-content" style="display:none;">                    <p style="font-size:12px; color:#666; margin-bottom:15px;">以下设置仅对“关注列表”匹配到的内容生效:</p>                    <div style="margin-bottom:15px; display:flex; align-items:center; gap:10px;">                        <span>文字颜色:</span>                        <input type="color" id="in-s-tc" value="${config.style.titleColor}">                        <span style="font-size:11px;color:#999">(关注贴标题 / 关注评论者ID)</span>                    </div>                    <div style="margin-bottom:15px; display:flex; align-items:center; gap:10px;">                        <span>背景颜色:</span>                        <input type="color" id="in-s-bg" value="${config.style.bgColor}">                        <span style="font-size:11px;color:#999">(行背景色)</span>                    </div>                </div>            </div>            <div style="padding:15px; border-top:1px solid #eee; display:flex; justify-content:flex-end; gap:10px; background:#fafafa;">                <button id="ns-save" style="padding:8px 20px; background:#1a73e8; color:#fff; border:none; border-radius:4px; cursor:pointer; font-weight:bold;">保存并刷新</button>            </div>        `;        document.body.appendChild(panel);        const tabs = document.querySelectorAll('.ns-tab');        tabs.forEach(tab => {            tab.onclick = () => {                const target = tab.getAttribute('data-tab');                const contents = document.querySelectorAll('.ns-tab-content');                contents.forEach(content => {                    content.style.display = 'none';                });                const targetEl = document.getElementById('tab-' + target);                if (targetEl) {                    targetEl.style.display = 'block';                }                tabs.forEach(t => {                    t.style.color = '#666';                    t.style.borderBottom = 'none';                    t.style.fontWeight = 'normal';                });                tab.style.color = (target === 'block' ? '#d93025' : (target === 'follow' ? '#188038' : '#1a73e8'));                tab.style.borderBottom = `2px solid ${tab.style.color}`;                tab.style.fontWeight = 'bold';            };        });        // 拖拽        const handle = document.getElementById('ns-drag-handle');        let isDragging = false, offset = [0, 0];        handle.onmousedown = (e) => {            isDragging = true;            offset = [panel.offsetLeft - e.clientX, panel.offsetTop - e.clientY];        };        document.onmousemove = (e) => {            if (!isDragging) return;            panel.style.left = (e.clientX + offset[0]) + 'px';            panel.style.top = (e.clientY + offset[1]) + 'px';        };        document.onmouseup = () => { isDragging = false; };        // 事件绑定        btn.onclick = () => { panel.style.display = 'block'; };        document.getElementById('ns-close-x').onclick = () => { panel.style.display = 'none'; };        document.getElementById('ns-save').onclick = () => {            config = {                block: {                    uids: parseInput(document.getElementById('in-b-uids').value),                    keys: parseInput(document.getElementById('in-b-keys').value)                },                follow: {                    uids: parseInput(document.getElementById('in-f-uids').value),                    keys: parseInput(document.getElementById('in-f-keys').value)                },                style: {                    titleColor: document.getElementById('in-s-tc').value,                    bgColor: document.getElementById('in-s-bg').value                }            };            GM_setValue('ns_enhanced_config', config);            applyLogic();            panel.style.display = 'none';        };    };    createUI();    applyLogic();    // 监听全站动态加载    new MutationObserver(applyLogic).observe(document.body, { childList: true, subtree: true });})();