// ==UserScript==
// @name TagPro Jerseys
// @version 0.1
// @description Set and change ball jerseys directly from the group page
// @include http://tagpro-*.koalabeast.com:*
// @include http://tagpro-*.koalabeast.com/groups/*
// @include http://tangent.jukejuice.com:*
// @include http://tangent.jukejuice.com/groups/*
// @include http://*.newcompte.fr:*
// @include http://*.newcompte.fr/groups/*
// @grant GM_setValue
// @grant GM_getValue
// @author Some Ball -1
// ==/UserScript==
// Spin the jerseys to show ball rotation
var spinJerseys = true; //true or false
// Add your own imgur album links here inside quotes with commas between quoted album links
// For example: var customAlbums = ["http://imgur.com/a/0zBNw", "http://imgur.com/a/1abcD"]; (do not include comma if only 1 album)
// Images should have titles that match team names and a single digit numerical description that matches team color (0 for either/both, 1 for red, 2 for blue)
var customAlbums = ["http://imgur.com/a/W3a8J"];
// Add your own imgur image links here inside quotes with commas between quoted image links, it must links to the png file
// For example: var customImages = ["http://i.imgur.com/17aAwABc.png", "http://i.imgur.com/abc123DEF.png"]; (do not include comma if only 1 image)
// Images should have titles that match team names and a single digit numerical description that matches team color (0 for either/both, 1 for red, 2 for blue)
var customImages = [];
if(location.pathname.match(/\/groups\/.+/)) //group page
{
var init = false;
tagpro.group.socket.on('private',function(priv) {
if(GM_getValue('groupId')!==location.pathname) //new group
{
GM_setValue('groupId',location.pathname);
GM_setValue('fromGroup',false);
GM_setValue('redJersey',false);
GM_setValue('blueJersey',false);
}
if(priv.isPrivate && !init)
{
setup();
init = true;
}
});
function setup()
{
$('#redTeam div:first').after($('