Changed up your default code a little bit.
Made it easier to edit a few things, such as site background.
Added cycle feature for Who's Playing, with ability to easily add/remove servers + interval timer.
and also made it simple for people to create buttons for replies with 1 line.
Enjoy
//Server list for sideBar
var servers = [
"play.zarpgaming.com:27015",
"play.zarpgaming.com:27025",
"play.zarpgaming.com:27030",
"play.zarpgaming.com:27040",
"play.zarpgaming.com:27035",
"play.zarpgaming.com:27100",
"usa.zarpgaming.com:27015"
];
serverUpdateInterval = 10;
/*
General Site Edits
*/
var siteBackgroundIMG = 'http://htmlcolorcodes.com/assets/images/html-color-codes-color-tutorials-hero-00e10b1f.jpg';
// Create buttons for reaplys
var banAppealbtn = createReplyBtn("Ban Appeal Template", '[url=http://zarpgaming.com/index.php/forum/appeals/40539-punishment-appeal-template]Appeal Templates[/url]');
// Don't Edit This
document.body.style.backgroundImage = "url("+siteBackgroundIMG+")";
document.getElementsByClassName("rt-header-border")[0].style.backgroundColor = "rgba(0,0,0,0)";
function changeWhosPlaying(){
var randServrint = Math.floor((Math.random() * servers.length) + 1);
var server = servers[clamp(randServrint, 0, servers.length -1)];
console.log(server);
document.getElementsByClassName("rt-block title4 box4 visible-desktop")[0].getElementsByClassName("module-surround")[0].getElementsByClassName("module-content")[0].getElementsByClassName("customtitle4 box4 visible-desktop")[0].getElementsByClassName("visible-large")[0].getElementsByTagName("iframe")[0].src='http://cache.www.gametracker.com/components/html0/?host='+server+'&bgColor=1F2642&fontColor=8790AE&titleBgColor=11172D&titleColor=FFFFFF&borderColor=333333&linkColor=FF9900&borderLinkColor=999999&showMap=0&showCurrPlayers=0&topPlayersHeight=100&showTopPlayers=1&showBlogs=0&width=250';
}
setInterval(function(){ changeWhosPlaying();}, serverUpdateInterval *1000);
function clamp(num, min, max){
return Math.min(Math.max(num, min), max);
}
function createReplyBtn(Title, Text){
try{
var btn = document.createElement("INPUT");
var t = document.createTextNode("CLICK ME");
btn.appendChild(t);
btn.className = "kbutton";
btn.type = "Button";
btn.value = Title;
btn.onclick = function(){ document.getElementById("kbbcode-message").value = Text };
document.getElementById("kpost-buttons").getElementById("kpost-buttons").appendChild(btn);
return btn;
}catch(err){
return null;
}
}
Also thx for the chrome extension, comes in useful