EM deathsound

Adds button to profiles to listen to deathsound

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         EM deathsound
// @version      1.0
// @description  Adds button to profiles to listen to deathsound
// @author       Whitepimp007
// @match        https://epicmafia.com/user/*
// @match        https://epicmafia.com/u/*
// @grant        none
// @namespace https://greasyfork.org/users/105745
// ==/UserScript==


var profileLink = document.getElementsByClassName("lcontrols sel")[0].children[0].href;
var profileNumber = profileLink.replace("https://epicmafia.com/user/","");
console.log(profileNumber);

var deathSoundLink = "https://epicmafia.com/uploads/deathsounds/" + profileNumber + ".ogg";

var userbox = document.getElementById("finduserbox");

var constructSpan=document.createElement("span");
constructSpan.className="lcontrols";

var constructAnchor=document.createElement("a");
constructAnchor.href=deathSoundLink;

var constructI=document.createElement("i");
constructI.className="icon-music";
constructI.innterHTML="::before";

constructAnchor.appendChild(constructI);
constructSpan.appendChild(constructAnchor);
userbox.appendChild(constructSpan);