EM deathsound

Adds button to profiles to listen to deathsound

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==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);