forked from Multarix/Discord-Hide-Blocked-Messages
-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.user.js
20 lines (19 loc) · 982 Bytes
/
script.user.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// ==UserScript==
// @name Discord Hide Blocked Messages
// @namespace https://github.com/Multarix/Discord-Hide-Blocked-Messages
// @match https://discord.com/*
// @downloadURL https://raw.githubusercontent.com/Multarix/Discord-Hide-Blocked-Messages/master/script.user.js
// @homepageURL https://github.com/Multarix/Discord-Hide-Blocked-Messages
// @supportURL https://github.com/Multarix/Discord-Hide-Blocked-Messages/issues
// @grant none
// @version 1.0
// @author Anonymous
// @description 10/28/2020, 1:37:40 PM
// ==/UserScript==
function hideBlocked(){
const blocked = document.querySelectorAll('[class^="groupStart"]'); // Find all "Blocked Messages"
blocked.forEach(blokMsg => {
if(blokMsg.style.display !== "none") blokMsg.style.display = "none"; // Hide the message if it's not already hidden.
});
};
setInterval(hideBlocked, 500); // Repeat every half second. Recommended to keep at 500, but raise/ lower if you wish.