v2ex toolbox

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

Stan na 30-01-2019. Zobacz najnowsza wersja.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name         v2ex toolbox
// @namespace    https://greasyfork.org/zh-CN/users/239647-lenville
// @version      0.1.3
// @description  隐藏没头像用户的Feeds&手动屏蔽用户
// @author       Lenville
// @match        https://www.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',
    ]

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