v2ex toolbox

隐藏没头像用户的Feeds&手动屏蔽用户

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         v2ex toolbox
// @namespace    https://greasyfork.org/zh-CN/users/239647-lenville
// @version      0.1.7
// @description  隐藏没头像用户的Feeds&手动屏蔽用户
// @author       Lenville
// @match        *v2ex.com/*
// @grant        none
// @esversion    6
// ==/UserScript==

/* jshint esversion: 6 */
(function() {
    'use strict'

    // 隐藏没头像用户的Feeds
    var list = document.querySelectorAll('.box .cell.item')
    list.forEach(o => /d=retro/.test(o.querySelector('img').src) && (o.hidden = true))

    var blockedUsers = [
        'briefcopy',
        'zmqking',
        'KasonPasser',
        'ls1164917500',
        'YiChen233',
    ]

    var list2 = document.querySelectorAll('.topic_info')
    list2.forEach(o => blockedUsers.include(o.querySelector('strong a').innerHTML) && (o.hidden = true))
})();