Discord Anonymise

Makes Discord names anonymous only on your screen (e.g. [2240] Anonymous)

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==UserScript==
// @name         Discord Anonymise
// @namespace    YGe7foucg9
// @version      1.0.2
// @description  Makes Discord names anonymous only on your screen (e.g. [2240] Anonymous)
// @author       YGe7foucg9
// @match        *discord.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

var username = document.getElementsByClassName("username-1A8OIy");
var userAvatar = document.getElementsByClassName("avatar-1BDn8e");
var userMention = document.getElementsByClassName("mention wrapper-3WhCwL mention interactive");
var joined = document.getElementsByClassName("content-2M3n_H");
var imgUrl;

function refreshData()
{
for (var i = 0; i < username.length; i++) {
    imgUrl = document.getElementsByClassName("avatar-1BDn8e clickable-1bVtEA")[i].src.split('/').slice(-2)[0].substring(14);
    username[i].textContent = "[" + imgUrl + "] Anonymous";
    userAvatar[i].style.visibility = "hidden";
}
for (var u= 0; u < userMention.length; u++) {
    userMention[u].textContent = "@Anonymous";
}
for (var j= 0; j < joined.length; j++) {
    joined[j].getElementsByClassName("anchor-3Z-8Bb anchorUnderlineOnHover-2ESHQB")[0].textContent = "Anonymous";
    if (joined[j].getElementsByClassName("anchor-3Z-8Bb anchorUnderlineOnHover-2ESHQB").length > 1) {
        joined[j].getElementsByClassName("anchor-3Z-8Bb anchorUnderlineOnHover-2ESHQB")[1].textContent = "Anonymous";
    }
}
    setTimeout(refreshData, 16);
}
refreshData();
})();