Last active
May 20, 2019 03:41
-
-
Save bash-tp/fd48db1c4f06560b4be82b5fc5a84526 to your computer and use it in GitHub Desktop.
TagPro Show Server Name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name TagPro Show Server Name | |
// @namespace http://www.reddit.com/user/bash_tp/ | |
// @description Show TagPro server name before ping info | |
// @include *://*.koalabeast.com* | |
// @include *://*.jukejuice.com* | |
// @include *://*.newcompte.fr* | |
// @author bash# | |
// @version 1.1 | |
// @updateURL https://gist.github.com/bash-tp/fd48db1c4f06560b4be82b5fc5a84526/raw/tagpro_show_server_name.user.js | |
// @downloadURL https://gist.github.com/bash-tp/fd48db1c4f06560b4be82b5fc5a84526/raw/tagpro_show_server_name.user.js | |
// ==/UserScript== | |
tagpro.ready(function() { | |
if (tagpro.renderer === undefined) { | |
return; | |
} | |
var host = tagproConfig.gameSocket || tagpro.host; | |
host = host.replace(/\..*$/, "").replace(/^tagpro-/, ""); | |
host = host.charAt(0).toUpperCase() + host.slice(1); | |
var performanceInfo = tagpro.ui.performanceInfo; | |
tagpro.ui.performanceInfo = function() { | |
performanceInfo.apply(this, arguments); | |
var info = tagpro.ui.sprites.performanceInfo; | |
if (info.visible && !info.text.match(/\|/)) { | |
info.text = host + " | " + info.text; | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment