您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Adds button to profiles to listen to deathsound
- // ==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);