Hide block messages on discord

Hide blocked messages completely

// ==UserScript==
// @name         Hide block messages on discord
// @namespace    https://greasyfork.org/en/users/2205
// @version      0.2
// @description  Hide blocked messages completely
// @author       Rudokhvist
// @license      Apache-2.0
// @match        https://discordapp.com/*
// @match        https://discord.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    let blockedlist = document.querySelectorAll("div[class^='blockedSystemMessage']");
    blockedlist.forEach(elem=>(elem.parentElement.parentElement.style.display="none"));

    let mutationObserver = new MutationObserver(function(mutations) {
      mutations.forEach(function(mutation) {
          mutation.addedNodes.forEach( function(currentValue, currentIndex, listObj) {
              if (currentValue.nodeType == Node.ELEMENT_NODE) {
                  let blockedlist = currentValue.querySelectorAll("div[class^='blockedSystemMessage']");
                  blockedlist.forEach(elem=>(elem.parentElement.parentElement.style.display="none"));
              }
          });
      });
  });
  mutationObserver.observe(document.documentElement, {
      childList: true,
      subtree: true
  });
})();