Ignore Slack User

Ignore a user in Slack

当前为 2015-05-24 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Ignore Slack User
  3. // @namespace https://greasyfork.org/ja/scripts/10042
  4. // @version 1.0.0
  5. // @description Ignore a user in Slack
  6. // @author bigwheel
  7. // @match https://*.slack.com/*
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. // ここに無視したいユーザーを並べる
  12. var usersToBeIgnored = new Array("user1", "user2");
  13.  
  14. if(document.body) {
  15. $("#msgs_div").on('DOMSubtreeModified propertychange', function() {
  16. usersToBeIgnored.forEach(function(user) {
  17. $("div.message > *.message_sender:contains(" + user + ")").parent().hide();
  18. });
  19.  
  20. // ボットメッセージを一括無視したい場合はコメントイン
  21. // $(".bot_message").hide();
  22. // join/left メッセージを無視
  23. $(".joined").hide();
  24. $(".left").hide();
  25. });
  26. };