Hide Discord Servers

Hide Servers You Only Joined Them For Global Emotes :)

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        Hide Discord Servers
// @description Hide Servers You Only Joined Them For Global Emotes :)
// @version     1.1
// @author      KudoAmine
// @namespace   http://tampermonkey.net/
// @match       *://discordapp.com/*
// @run-at       document-idle

// ==/UserScript==

// Add Servers' Names or IDs below, e.g. : var ServersToHide = ["ServerName1","ServerName2","ServerName3",...];

var ServersToHide = ["ServerName1"];

function JustWait() {
var guilds = document.getElementsByClassName("listItem-2P_4kh");
if (guilds.length>6){
HideServers ()
  } else {
setTimeout(function(){
    JustWait()
}, 2000);
}
}

function HideServers () {
var guilds = document.getElementsByClassName("listItem-2P_4kh");
var i,j;
for (j=0;j<ServersToHide.length;j++){
for (i=1;i<guilds.length - 1;i++){
if(guilds[i].innerHTML.indexOf(ServersToHide[j])!=-1){
guilds[i].style.display="none";
}
}
}
}

JustWait()