Ignore Slack User

Ignore a user in Slack

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         Ignore Slack User
// @namespace    https://greasyfork.org/ja/scripts/10042
// @version      1.0.0
// @description  Ignore a user in Slack
// @author       bigwheel
// @match        https://*.slack.com/*
// @grant        none
// ==/UserScript==

// ここに無視したいユーザー・ボットの名前を並べる
var usersToBeIgnored = new Array("user1", "user2");

if(document.body) {
    $("#msgs_div").on('DOMSubtreeModified propertychange', function() {
        usersToBeIgnored.forEach(function(user) {
            $("div.message > *.message_sender:contains(" + user + ")").parent().hide();
        });

        // ボットメッセージを一括無視したい場合はコメントイン
        // $(".bot_message").hide();
        
        // join/left メッセージを無視
        $(".joined").hide();
        $(".left").hide();
    });
};