
由于忽略节点规则是“被忽略的节点中的主题将不会在首页出现”,但我希望翻页后那些节点也不要出现,所以写了下面油猴脚本代码。把代码里面的/go/a和/go/b改成不想看的节点就行,还可以添加更多节点。
// ==UserScript== // @name V2EX 自定义 // @namespace http://tampermonkey.net/ // @version v0.0.1 // @description 自定义操作 // @author You // @match https://*.v2ex.com/* // ==/UserScript== (function() { 'use strict'; const elements = document.querySelectorAll('div.cell.item[style=""]'); elements.forEach((element) => { if (element.querySelector('a.node[href="/go/a"], a.node[href="/go/b"]')) { element.remove() } }); })();