v2ex toolbox

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

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

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.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==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))
})();