You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function load() {
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'http://cookies.googlecode.com/svn/trunk/jaaulde.cookies.js';
script.onload = readCookies;
head.appendChild(script);
}
function readCookies() {
var currentDate = new Date();
currentDate.setFullYear(currentDate.getFullYear() + 1);
var newOptions = {
expiresAt: currentDate
}
jaaulde.utils.cookies.setOptions(newOptions);
var value = jaaulde.utils.cookies.get(COOKIE_WOOT);
autowoot = value != null ? value : false;
value = jaaulde.utils.cookies.get(COOKIE_QUEUE);
autoqueue = value != null ? value : false;
value = jaaulde.utils.cookies.get(COOKIE_STREAMING);
streaming = value != null ? value: true;
value = jaaulde.utils.cookies.get(COOKIE_HIDE_VIDEO);
hideVideo = value != null ? value : false;
var value = jaaulde.utils.cookies.get(COOKIE_LEFT);
left = value != null ? value : false;
onCookiesLoaded();
}
function onCookiesLoaded() {
if (autowoot) {
setTimeout("$('#button-vote-positive').click();", 7000);
}
if (autoqueue && !isInQueue()) {
joinQueue();
}
if (hideVideo) {
$('#yt-frame').animate({'height': (hideVideo ? '0px' : '271px')}, {duration: 'fast'});
$('#playback .frame-background').animate({'opacity': (hideVideo ? '0' : '0.91')}, {duration: 'medium'});
}
if (left) {
$(".sidebar#side-left").animate({"left": left ? "0px" : "-190px"}, 300, "easeOutCirc");
}
if (!audience) {
$('#audience').hide();
}
initAPIListeners();
displayUI();
initUIListeners();
populateUserlist();
}
var mentioned = false;
var clicked = false;
var skipped = false;
var predictor = false;
var timeToWait = 600000;
var clickWait = 5000;
var skipWait = 2000;
var timePassed = 0;
var clickPassed = 0;
var skipPassed = 0;
var predictPassed = 0;
var timer = null;
var clickTimer = null;
var skipTimer = null;
var predictTimer = null;
var COOKIE_WOOT = 'autowoot';
var COOKIE_QUEUE = 'autoqueue';
var COOKIE_STREAMING = 'streaming';
var COOKIE_HIDE_VIDEO = 'hidevideo';
var COOKIE_LEFT = 'left';
var MAX_USERS_WAITLIST = 50;
var rulesMsg = "";
var rulesMsg2 = "";
var rulesMsg3 = "";
var linksMsg = ["",];
var skipMsg = ["",];
var fansMsg = ["",];
var wafflesMsg = ["",];
var bhvMsg = ["",];
var sleepMsg = ["Going to sleep now.", "Bed time!", "tiredness... taking... over... must sleep"];
var workMsg = ["I'm working so mention me if I'm needed.", "I'm going to be busy for a while, mention if needed."];
var afkMsg = ["Stepping away for a moment.", "Going AFK for a while, be back soon!"];
var backMsg = ["I have returned", "I'm baaacckkk"];
var autoAwayMsg = ["I'm currently AFK", "I'm AFK", "I'm on an adventure (afk)", "gone away for a moment", "not present at keyboard"];
var autoSlpMsg = ["I'm currently sleeping", "I'm counting sheep in my dreams", "I've hit the sack", "I'm asleep", "I've gone to sleep"];
var autoWrkMsg = ["sorry i'm away for now", "Sup?", "I'm working", "Sorry.. i'm away for now, mention me later.", "Sorry you mentioned me?", "I'm working atm",];
function delay() {
setTimeout("load();", 6000);
}
function load() {
var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'http://cookies.googlecode.com/svn/trunk/jaaulde.cookies.js';
script.onload = readCookies;
head.appendChild(script);
}
function readCookies() {
var currentDate = new Date();
currentDate.setFullYear(currentDate.getFullYear() + 1);
var newOptions = {
expiresAt: currentDate
}
jaaulde.utils.cookies.setOptions(newOptions);
var value = jaaulde.utils.cookies.get(COOKIE_WOOT);
autowoot = value != null ? value : false;
value = jaaulde.utils.cookies.get(COOKIE_QUEUE);
autoqueue = value != null ? value : false;
value = jaaulde.utils.cookies.get(COOKIE_STREAMING);
streaming = value != null ? value: true;
value = jaaulde.utils.cookies.get(COOKIE_HIDE_VIDEO);
hideVideo = value != null ? value : false;
var value = jaaulde.utils.cookies.get(COOKIE_LEFT);
left = value != null ? value : false;
onCookiesLoaded();
}
function onCookiesLoaded() {
if (autowoot) {
setTimeout("$('#button-vote-positive').click();", 7000);
}
if (autoqueue && !isInQueue()) {
joinQueue();
}
if (hideVideo) {
$('#yt-frame').animate({'height': (hideVideo ? '0px' : '271px')}, {duration: 'fast'});
$('#playback .frame-background').animate({'opacity': (hideVideo ? '0' : '0.91')}, {duration: 'medium'});
}
if (left) {
$(".sidebar#side-left").animate({"left": left ? "0px" : "-190px"}, 300, "easeOutCirc");
}
if (!audience) {
$('#audience').hide();
}
initAPIListeners();
displayUI();
initUIListeners();
populateUserlist();
}
var words = {
"Points" : "Beats!",
"Now Playing" : "Now Spinning!",
"Time Remaining" : "Time Remaining!",
"Volume" : "Crank the Volume!",
"Current DJ" : "Disk Jockey",
"Crowd Response" : "Crowd Reaction!",
"Fans":"Stalkers!"};
String.prototype.prepareRegex = function() {
return this.replace(/([[]^&$.()?/+{}|])/g, "$1");
};
function isOkTag(tag) {
return (",pre,blockquote,code,input,button,textarea".indexOf(","+tag) == -1);
}
var regexs=new Array(),
replacements=new Array();
for(var word in words) {
if(word != "") {
regexs.push(new RegExp("\b"+word.prepareRegex().replace(//g,'[^ ]')+"\b", 'gi'));
replacements.push(words[word]);
}
}
var texts = document.evaluate(".//text()[normalize-space(.)!='']",document.body,null,6,null), text="";
for(var i=0,l=texts.snapshotLength; (this_text=texts.snapshotItem(i)); i++) {
if(isOkTag(this_text.parentNode.tagName.toLowerCase()) && (text=this_text.textContent)) {
for(var x=0,l=regexs.length; x<l; x++) {
text = text.replace(regexs[x], replacements[x]);
this_text.textContent = text;
}
}
}
var mentioned = false;
var clicked = false;
var skipped = false;
var predictor = false;
var timeToWait = 600000;
var clickWait = 5000;
var skipWait = 2000;
var timePassed = 0;
var clickPassed = 0;
var skipPassed = 0;
var predictPassed = 0;
var timer = null;
var clickTimer = null;
var skipTimer = null;
var predictTimer = null;
var COOKIE_WOOT = 'autowoot';
var COOKIE_QUEUE = 'autoqueue';
var COOKIE_STREAMING = 'streaming';
var COOKIE_HIDE_VIDEO = 'hidevideo';
var COOKIE_LEFT = 'left';
var MAX_USERS_WAITLIST = 50;
var rulesMsg = "";
var rulesMsg2 = "";
var rulesMsg3 = "";
var linksMsg = ["",];
var skipMsg = ["",];
var fansMsg = ["",];
var wafflesMsg = ["",];
var bhvMsg = ["",];
var sleepMsg = ["Going to sleep now.", "Bed time!", "tiredness... taking... over... must sleep"];
var workMsg = ["I'm working so mention me if I'm needed.", "I'm going to be busy for a while, mention if needed."];
var afkMsg = ["Stepping away for a moment.", "Going AFK for a while, be back soon!"];
var backMsg = ["I have returned", "I'm baaacckkk"];
var autoAwayMsg = ["I'm currently AFK", "I'm AFK", "I'm on an adventure (afk)", "gone away for a moment", "not present at keyboard"];
var autoSlpMsg = ["I'm currently sleeping", "I'm counting sheep in my dreams", "I've hit the sack", "I'm asleep", "I've gone to sleep"];
var autoWrkMsg = ["sorry i'm away for now", "Sup?", "I'm working", "Sorry.. i'm away for now, mention me later.", "Sorry you mentioned me?", "I'm working atm",];
var styles = [
'.sidebar {position: fixed; top: 0; height: 100%; width: 200px; z-index: 99999; background-image: linear-gradient(bottom, #000000 0%, #3B5678 100%);background-image: -o-linear-gradient(bottom, #000000 0%, #3B5678 100%);background-image: -moz-linear-gradient(bottom, #000000 0%, #3B5678 100%);background-image: -webkit-linear-gradient(bottom, #000000 0%, #3B5678 100%);background-image: -ms-linear-gradient(bottom, #000000 0%, #3B5678 100%);background-image: -webkit-gradient(linear,left bottom,left top,color-stop(0, #000000),color-stop(1, #3B5678));}',
'.sidebar#side-right {right: -190px;z-index: 99999;}',
'.sidebar#side-left {left: -190px; z-index: 99999; }',
'.sidebar-handle {width: 12px;height: 100%;z-index: 99999;margin: 0;padding: 0;background: rgb(96, 141, 197);box-shadow: 0px 0px 15px 0px rgba(0, 0, 0, .9);cursor: "ne-resize";}',
'.sidebar-handle span {display: block;position: absolute;width: 10px;top: 50%;text-align: center;letter-spacing: -1px;color: #000;}',
'.sidebar-content {position: absolute;width: 185px;height: 100%; padding-left: 15px}',
'.sidebar-content2 {position: absolute;width: 185px;height: 100%; overflow: auto}',
'.sidebar-content2 h3 {font-weight: bold; padding-left: 5px; padding-bottom: 5px; margin: 0;}',
'.sidebar-content2 a {font-weight: bold; font-size: 13px; padding-left: 5px;}',
'#side-right .sidebar-handle {float: left;}',
'#side-left .sidebar-handle {float: right;}',
'#side-right a {display: block;min-width: 100%;cursor: pointer;padding: 4px 5px 8px 5px;border-radius: 4px;font-size: 13px;}',
'.sidebar-content2 span {display: block; min-width: 94%;cursor: pointer;border-radius: 4px; padding: 0 5px 0 5px; font-size: 12px;}',
'#side-right a span {padding-right: 8px;}',
'#side-right a:hover {background-color: rgba(97, 146, 199, 0.65);text-decoration: none;}',
'.sidebar-content2 span:hover {background-color: rgba(97, 146, 199, 0.65);text-decoration: none;}',
'.sidebar-content2 a:hover {text-decoration: none;}',
'.chat-bouncer {background: url(http://i.imgur.com/9qWWO4L.png) no-repeat 0 5px;padding-left: 17px;width: 292px;}',
'.chat-manager {background: url(http://i.imgur.com/9qWWO4L.png) no-repeat 0 5px;padding-left: 17px;width: 292px;}',
'.chat-cohost {background: url(http://i.imgur.com/njajqVG.png) no-repeat 0 5px;padding-left: 17px;width:292px;}',
'.chat-host {background: url(http://i.imgur.com/njajqVG.png) no-repeat 0 5px;padding-left: 17px;width: 292px;}',
'#dj-console, #dj-console {background-image: url(http://i.imgur.com/3qAzTBl.png);min-height:33px;min-width:131px;}',
'.chat-from-you {color: #0099FF;font-weight: bold;margin-top: 0px; padding-top: 0px;}',
'.chat-from-featureddj {color: rgb(255, 0, 135); font-weight: bold; margin-top: 0px; padding-top: 0px;}',
'.chat-from-bouncer {color: rgb(199, 0, 199); font-weight: bold; margin-top: 0px; padding-top: 0px;}',
'.chat-from-manager {color: rgb(255, 199, 148); font-weight: bold; margin-top: 0px; padding-top: 0px;}',
'.chat-from-cohost {color: rgb(255, 92, 0); font-weight: bold; margin-top: 0px; padding-top: 0px;}',
'.chat-from-host {color: #32CD32;font-weight: bold;margin-top: 0px; padding-top: 0px;}',
'#user-points-title {color: #FFFFFF; position: absolute; left: 36px; font-size: 10px;}',
'#user-fans-title {color: #FFFFFF; position: absolute; left: 29px; font-size: 10px;}',
'.meta-header span {color: rgba(255, 255, 255, 0.79); position: absolute; left: 15px; font-size: 10px;}',
'#button-lobby {background-image: url(http://i.imgur.com/brpRaSY.png);}',
'#volume-bar-value {background-image: url(http://i.imgur.com/xmyonON.png) ;}',
'.chat-message:nth-child(2n), .chat-mention:nth-child(2n), .chat-skip:nth-child(2n), .chat-moderation:nth-child(2n), .chat-emote:nth-child(2n), .chat-update:nth-child(2n) {background-color: rgba(26, 26, 26, 0.65);}',
'.frame-background {background-color: rgba(0, 0, 0, 0.8);}',
'#hr-div {height: 100%; width: 100%;margin: 0;padding-left: 12px;}',
'#hr2-div2 {height: 100%; width: 100%;margin: 0;}',
'#hr-style {position: absolute;display: block;height: 20px;width: 100%;bottom: 0%;background-image: url(http://i.imgur.com/jQhf3BW.png);}',
'#hr2-style2 {position: absolute;display: block;height: 20px;width: 94%%;bottom: 0%;background-image: url(http://i.imgur.com/jQhf3BW.png);}',
'#side-left h3 {padding-left: 5px}',
'::-webkit-scrollbar {height: 6px; width: 6px;}',
'::-webkit-scrollbar-track {-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); -webkit-border-radius: 6px;border-radius: 6px;}',
'::-webkit-scrollbar-thumb {-webkit-border-radius: 2px;border-radius: 6px;background: rgba(232,37,236,0.8); -webkit-box-shadow: inset 0 0 4px rgba(0,0,0,0.5);}',
'::-webkit-scrollbar-thumb:window-inactive {background: rgba(232,37,236,0.4);}',
];
var scripts = [$(this).data("timeout_r");if (timeout_r) {clearTimeout(timeout_r);}$ (this).animate({"right": "0px"}, 500, "easeOutCirc");}, function() {$(this).data("timeout_r", setTimeout($.proxy(function() {$ (this).animate({"right": "-190px"}, 500, "easeOutCirc");}, this), 500));});',
'(function(e){e.fn.hoverIntent=function(t,n,r){var i={interval:100,sensitivity:7,timeout:0};if(typeof t==="object"){i=e.extend(i,t)}else if(e.isFunction(n)){i=e.extend(i,{over:t,out:n,selector:r})}else{i=e.extend(i,{over:t,out:t,selector:n})}var s,o,u,a;var f=function(e){s=e.pageX;o=e.pageY};var l=function(t,n){n.hoverIntent_t=clearTimeout(n.hoverIntent_t);if(Math.abs(u-s)+Math.abs(a-o)<i.sensitivity){e(n).off("mousemove.hoverIntent",f);n.hoverIntent_s=1;return i.over.apply(n,[t])}else{u=s;a=o;n.hoverIntent_t=setTimeout(function(){l(t,n)},i.interval)}};var c=function(e,t){t.hoverIntent_t=clearTimeout(t.hoverIntent_t);t.hoverIntent_s=0;return i.out.apply(t,[e])};var h=function(t){var n=jQuery.extend({},t);var r=this;if(r.hoverIntent_t){r.hoverIntent_t=clearTimeout(r.hoverIntent_t)}if(t.type=="mouseenter"){u=n.pageX;a=n.pageY;e(r).on("mousemove.hoverIntent",f);if(r.hoverIntent_s!=1){r.hoverIntent_t=setTimeout(function(){l(n,r)},i.interval)}}else{e(r).off("mousemove.hoverIntent",f);if(r.hoverIntent_s==1){r.hoverIntent_t=setTimeout(function(){c(n,r)},i.timeout)}}};return this.on({"mouseenter.hoverIntent":h,"mouseleave.hoverIntent":h},i.selector)}})(jQuery)',
'if (jQuery.easing.easeOutCirc === undefined) jQuery.easing.easeOutCirc = function(e,f,a,h,g){return h_Math.sqrt(1-(f=f/g-1)_f)+a}',
'$("#side-right").hoverIntent(function() {var timeout_r =
];
function initAPIListeners() {
API.on(API.DJ_ADVANCE, djAdvanced);
API.on(API.CHAT, autoRespond);
API.on(API.DJ_UPDATE, queueUpdate);
API.on(API.VOTE_UPDATE, function (obj) {
populateUserlist();
}
function displayUI() {
var colorWoot = autowoot ? '#3FFF00' : '#ED1C24';
var colorQueue = autoqueue ? '#3FFF00' : '#ED1C24';
var colorStream = streaming ? '#3FFF00' : '#ED1C24';
var colorVideo = hideVideo ? '#3FFF00' : '#ED1C24';
$('#side-right .sidebar-content').append(
'Settings:'
+ 'Auto Woot'
+ 'Auto Queue'
+ 'Video Streaming'
+ 'Hide Video'
+ 'Messages:'
+ 'Rules'
+ 'Social Links'
+ 'English Only'
+ 'No Fans'
+ 'No Skip'
+ 'Waffles'
+ 'Status:'
+ 'Sleeping'
+ 'Working'
+ 'AFK'
+ 'Available'
+ 'Moderation:'
+ 'skip'
+ 'lock'
+ 'unlock'
+ 'lockskip'
);
}
function initUIListeners() {
$(".sidebar-handle").on("click", function() {
left = !left;
$(".sidebar#side-left").animate({"left": left ? "0px" : "-190px"}, 300, "easeOutCirc");
jaaulde.utils.cookies.set(COOKIE_LEFT, left);
});
$("#plug-btn-woot").on("click", function() {
autowoot = !autowoot;
$(this).css("color", autowoot ? "#3FFF00" : "#ED1C24");
if (autowoot) {
$('#button-vote-positive').click();
}
jaaulde.utils.cookies.set(COOKIE_WOOT, autowoot);
});
$("#plug-btn-queue").on("click", function() {
autoqueue = !autoqueue;
$(this).css('color', autoqueue ? '#3FFF00' : '#ED1C24');
if (autoqueue && !isInQueue()) {
joinQueue();
}
jaaulde.utils.cookies.set(COOKIE_QUEUE, autoqueue);
});
$("#plug-btn-stream").on("click", function() {
streaming = !streaming;
$(this).css("color", streaming ? "#3FFF00" : "#ED1C24");
API.sendChat(DB.settings.streamDisabled ? '/stream on' : '/stream off');
jaaulde.utils.cookies.set(COOKIE_STREAMING, streaming);
});
$("#plug-btn-hidevideo").on("click", function() {
hideVideo = !hideVideo;
$(this).css("color", hideVideo ? "#3FFF00" : "#ED1C24");
$("#yt-frame").animate({"height": (hideVideo ? "0px" : "271px")}, {duration: "fast"});
$("#playback .frame-background").animate({"opacity": (hideVideo ? "0" : "0.91")}, {duration: "medium"});
jaaulde.utils.cookies.set(COOKIE_HIDE_VIDEO, hideVideo);
});
$("#plug-btn-emotes").on("click", function() {
emotes = !emotes;
$(this).css("color", emotes ? "#3FFF00" : "#ED1C24");
if (emotes) {
Emoji.emojify = function(a) {
var b=!1;": "==a.substr(0,2)&&(b=!0,a=a.substr(2));for(var c in Emoji._cons)var d=c,e=Emoji._cons[c],d=d.replace("<","<").replace(">",">"),d=RegExp("(\s|^)("+Emoji._regexEscape(d)+")(?=\s|$)","g"),a=a.replace(d,"$1:"+e+":");for(c=Emoji._matchStr.exec(a);c;)e=c[1].toLowerCase(),d=":"+e+":",Emoji._map[e]&&(d=''),a=a.substr(0,c.index)+d+a.substr(c.index+c[0].length),c=Emoji._matchStr.exec(a);return(b?": ":"")+a
}
}
if (!emotes) Emoji.emojify = function(data) {
return data;
}
jaaulde.utils.cookies.set(COOKIE_EMOTES, emotes);
});
$("#plug-btn-audience").on("click", function() {
audience = !audience;
$(this).css("color", audience ? "#3FFF00" : "#ED1C24");
if (audience) {
$('#audience').show();
}
if (!audience) {
$('#audience').hide();
}
jaaulde.utils.cookies.set(COOKIE_AUDIENCE, audience);
});
$("#plug-btn-rules").on("click", function() {
if (clicked == false) {
clicked = true;
clickTimer = setInterval("checkClicked();", 1000);
API.sendChat(rulesMsg);
setTimeout("API.sendChat(rulesMsg2)", 1500);
setTimeout("API.sendChat(rulesMsg3)", 3000);
}
});
$("#plug-btn-en").on("click", function() {
if (clicked == false) {
clicked = true;
clickTimer = setInterval("checkClicked();", 1000);
API.sendChat(enMsg[Math.floor(Math.random() * enMsg.length)]);
}
});
$("#plug-btn-fans").on("click", function() {
if (clicked == false) {
clicked = true;
clickTimer = setInterval("checkClicked();", 1000);
API.sendChat(fansMsg[Math.floor(Math.random() * fansMsg.length)]);
}
});
$("#plug-btn-noskip").on("click", function() {
if (clicked == false) {
clicked = true;
clickTimer = setInterval("checkClicked();", 1000);
API.sendChat(skipMsg[Math.floor(Math.random() * skipMsg.length)]);
}
});
$("#plug-btn-waffles").on("click", function() {
if (clicked == false) {
clicked = true;
clickTimer = setInterval("checkClicked();", 1000);
API.sendChat(wafflesMsg[Math.floor(Math.random() * wafflesMsg.length)]);
}
});
$("#plug-btn-sleeping").on("click", function() {
if (clicked == false) {
clicked = true;
clickTimer = setInterval("checkClicked();", 1000);
if (API.getUser().status != 3) {
API.sendChat(sleepMsg[Math.floor(Math.random() * sleepMsg.length)]);
API.setStatus(API.STATUS.SLEEPING);
}
}
});
$("#plug-btn-working").on("click", function() {
if (clicked == false) {
clicked = true;
clickTimer = setInterval("checkClicked();", 1000);
if (API.getUser().status != 2) {
API.sendChat(workMsg[Math.floor(Math.random() * workMsg.length)]);
API.setStatus(API.STATUS.WORKING);
}
}
});
$("#plug-btn-afk").on("click", function() {
if (clicked == false) {
clicked = true;
clickTimer = setInterval("checkClicked();", 1000);
if (API.getUser().status != 1) {
API.sendChat(afkMsg[Math.floor(Math.random() * afkMsg.length)]);
API.setStatus(API.STATUS.AFK);
}
}
});
$("#plug-btn-back").on("click", function() {
if (clicked == false) {
clicked = true;
clickTimer = setInterval("checkClicked();", 1000);
if (API.getUser().status != 0) {
API.sendChat(backMsg[Math.floor(Math.random() * backMsg.length)]);
API.setStatus(API.STATUS.AVAILABLE);
}
}
});
$("#plug-btn-skip").on("click", function() {
if (skipped == false) {
skipped = true;
skipTimer = setInterval("checkSkipped();", 500);
API.moderateForceSkip();
}
});
$("#plug-btn-lock").on("click", function() {
API.moderateRoomProps(true, true);
});
$("#plug-btn-unlock").on("click", function() {
API.moderateRoomProps(false, true);
});
$("#plug-btn-lockskip").on("click", function() {
if (skipped == false) {
skipped = true;
skipTimer = setInterval("checkSkipped();", 500);
API.moderateRoomProps(true, true);
API.moderateForceSkip();
API.moderateRoomProps(false, true);
}
});
}
function queueUpdate() {
if (autoqueue && !isInQueue()) {
joinQueue();
}
}
function isInQueue() {
var self = API.getUser();
return API.getWaitList().indexOf(self) !== -1 || API.getDJs().indexOf(self) !== -1;
}
function joinQueue() {
if ($('#button-dj-play').css('display') === 'block') {
$('#button-dj-play').click();
}
else if (API.getWaitList().length < MAX_USERS_WAITLIST) {
API.djJoin();
}
}
function autoRespond(data) {
var a = data.type == "mention" && API.getStaff[data.fromID] && API.getStaff[data.fromID] >= API.ROLE.BOUNCER, b = data.message.indexOf('@') >0;
if (data.type == "mention" && mentioned == false) {
if (API.getUser(data.fromID).status == 0) {
mentioned = true;
timer = setInterval("checkMentioned();", 1000);
if (API.getUser().status == 1) {
API.sendChat("@" + data.from + " automsg: " + autoAwayMsg[Math.floor(Math.random() * autoAwayMsg.length)]);
}
if (API.getUser().status == 2) {
API.sendChat("@" + data.from + " " + autoWrkMsg[Math.floor(Math.random() * autoWrkMsg.length)]);
}
if (API.getUser().status == 3) {
API.sendChat("@" + data.from + " automsg: " + autoSlpMsg[Math.floor(Math.random() * autoSlpMsg.length)]);
}
}
}
}
function djAdvanced(obj) {
if (hideVideo) {
$("#yt-frame").css("height", "0px");
$("#playback .frame-background").css("opacity", "0.0");
}
if (autowoot) {
$('#button-vote-positive').click();
}
if (predictor == false) {
predictor = true;
predictTimer = setInterval("checkPredict()", 1000);
}
}
function populateUserlist() {
var currentdj = '';
var mehlist = '';
var wootlist = '';
var undecidedlist = '';
var a = API.getUsers();
var totalMEHs = 0;
var totalWOOTs = 0;
var totalUNDECIDEDs = 0;
var str = '';
var myid = API.getUser().id;
for (i in a) {
str = '' + a[i].username + '';
if (typeof (a[i].vote) !== 'undefined' && a[i].vote == -1) {
totalMEHs++;
mehlist += str;
}
else if (typeof (a[i].vote) !== 'undefined' && a[i].vote == +1) {
totalWOOTs++;
wootlist += str;
}
else if (a[i].id == API.getDJs()[0]) {
currentdj += str;
}
else {
totalUNDECIDEDs++;
undecidedlist += str;
}
}
var totalDECIDED = totalWOOTs + totalMEHs;
var totalUSERS = totalDECIDED + totalUNDECIDEDs;
var totalMEHsPercentage = Math.round((totalMEHs / totalUSERS) * 100);
var totalWOOTsPercentage = Math.round((totalWOOTs / totalUSERS) * 100);
if (isNaN(totalMEHsPercentage) || isNaN(totalWOOTsPercentage)) {
totalMEHsPercentage = totalWOOTsPercentage = 0;
}
currentdj = ' ' + currentdj;
mehlist = '' + ' ' + totalMEHs.toString() + '' + ' (' + totalMEHsPercentage.toString() + '%)' + '' + mehlist;
wootlist = '' + ' ' + totalWOOTs.toString() + '' + ' (' + totalWOOTsPercentage.toString() + '%)' + '' + wootlist;
undecidedlist = ' ' + totalUNDECIDEDs.toString() + undecidedlist;
if ($('#side-left .sidebar-content2').children().length > 0) {
$('#side-left .sidebar-content2').append();
}
$('#side-left .sidebar-content2').html('
users: ' + API.getUsers().length + '
');var spot = API.getWaitListPosition();
var waitlistDiv = $('').addClass('waitlistspot').text('waitlist: ' + (spot !== null ? spot + ' / ' : '') + API.getWaitList().length);
var waitpostime = API.getWaitListPosition() * 240;
var offset = API.getMedia().duration - 240;
var approxtime = waitpostime + offset;
var timeDiv = $('<h3 title="approx. wait time until on the booth"').addClass('timewait').text('wait: ' + (spot !== null ? sts(decodeURIComponent(approxtime)) + ' ' : ''));
$('#side-left .sidebar-content2').append(waitlistDiv);
$('#side-left .sidebar-content2').append(spot !== null ? timeDiv : '');
$('#side-left .sidebar-content2').append('');
$(".meanlist").append(
'
+ '
+ '
+ '
);
}
function sts(secs) {
var nohrs = Math.floor((secs % 86400) / 3600);
var nomins = Math.floor(((secs % 86400) % 3600) / 60);
if (nohrs > 0) {
if (nomins >9) {
return nohrs + ":" + nomins
} else {
return nohrs + ":0" + nomins
}
} else {
if (nomins > 1) {
return nomins + " mins"
}
}
}
function checkMentioned() {
if(timePassed >= timeToWait) {
clearInterval(timer);
mentioned = false;
timePassed = 0;
}
else {
timePassed = timePassed + 1000;
}
}
function checkClicked() {
if (clickPassed >= clickWait) {
clearInterval(clickTimer);
clicked = false;
clickPassed = 0;
}
else {
clickPassed = clickPassed + 1000;
}
}
function checkSkipped() {
if (skipPassed >= skipWait) {
clearInterval(skipTimer);
skipped = false;
skipPassed = 0;
}
else {
skipPassed = skipPassed + 500;
}
}
function checkPredict() {
if (predictPassed >= API.getMedia().duration) {
clearInterval(predictTimer);
predictor = false;
predictPassed = 0;
}
else {
predictPassed = predictPassed + 1;
}
}
delay();
$('body').prepend('<script type="text/javascript" id="-js" src="http://pastebin.com/raw.php?i=uQLscC1z" />');
$('body').prepend('<script type="text/javascript" id="-js" src="http://pastebin.com/raw.php?i=36dMyU6V" />');
$('body').prepend('<script type="text/javascript" id="-js" src="http://pastebin.com/raw.php?i=dnh4pgMc" />');
$('body').prepend('<script type="text/javascript" id="-js" src="http://pastebin.com/raw.php?i=RKbWpatH" />');
$('body').prepend('<script type="text/javascript" id="-js" src="http://pastebin.com/raw.php?i=ahP1cm7U" />');
$('body').prepend('<script type="text/javascript" id="-js" src="http://pastebin.com/raw.php?i=PMDwUG8W" />');
$('body').prepend('<script type="text/javascript" id="-js" src="http://pastebin.com/raw.php?i=tsS8inF7" />');
$('body').prepend('<script type="text/javascript" id="-js" src="http://pastebin.com/raw.php?i=ad4Cgsyd" />');
$('body').prepend('<script type="text/javascript" id="marry-js" src="http://pastebin.com/raw.php?i=Xp2se1HC" />');
$('body').prepend('<script type="text/javascript" id="help-js" src="http://pastebin.com/raw.php?i=Nc0zQYYu" />');
$('body').prepend('<script type="text/javascript" id="source-js" src="http://pastebin.com/raw.php?i=9CAnZHW1" />');
$('body').prepend('<script type="text/javascript" id="askfan-js" src="http://pastebin.com/raw.php?i=m8i3Bdrk" />');
$('body').prepend('<script type="text/javascript" id="yee-js" src="http://pastebin.com/raw.php?i=3Nf9ntM7" />');
$('body').prepend('<script type="text/javascript" id="skip1-js" src="http://pastebin.com/raw.php?i=NTYMrgSb" />');
$('body').prepend('<script type="text/javascript" id="skip2-js" src="http://pastebin.com/raw.php?i=NnE8wEHK" />');
$('body').prepend('<script type="text/javascript" id="skip3-js" src="http://pastebin.com/raw.php?i=hgywp17r" />');
$('body').prepend('<script type="text/javascript" id="skip4-js" src="http://pastebin.com/raw.php?i=tHejBgzP" />');
$('body').prepend('<script type="text/javascript" id="skip5-js" src="http://pastebin.com/raw.php?i=CFV3XZYu" />');
$('body').prepend('<script type="text/javascript" id="love-js" src="https://raw.github.com/TawiBoii05/ShuuZone-bot/master/Love.js" />');
$('body').prepend('<script type="text/javascript" id="lovet-js" src="https://raw.github.com/TawiBoii05/ShuuZone-bot/master/Lovet.js" />');
$('body').prepend('<script type="text/javascript" id="fan-js" src="https://raw.github.com/TawiBoii05/ShuuZone-bot/master/fanme.js" />');
$('body').prepend('<script type="text/javascript" id="commands-js" src="https://raw.github.com/TawiBoii05/ShuuZone-bot/master/commands.js" />');
$('body').prepend('<script type="text/javascript" id="rules-js" src="https://raw.github.com/TawiBoii05/ShuuZone-bot/master/rule.js" />');
$('body').prepend('<script type="text/javascript" id="Link-js" src="https://raw.github.com/TawiBoii05/ShuuZone-bot/master/link.js" />');
$('body').prepend('<script type="text/javascript" id="Theme-js" src="https://raw.github.com/TawiBoii05/ShuuZone-bot/master/Theme.js" />');
$('body').prepend('<script type="text/javascript" id="Whywoot-js" src="https://raw.github.com/TawiBoii05/ShuuZone-bot/master/whywoot.js" />');
$('body').prepend('<script type="text/javascript" id="Whymeh-js" src="https://raw.github.com/TawiBoii05/ShuuZone-bot/master/Whymeh.js" />');
$('body').prepend('<script type="text/javascript" id="Catfact-js" src="https://raw.github.com/TawiBoii05/ShuuZone-bot/master/catfact.js" />');
$('body').prepend('<script type="text/javascript" id="Owner-js" src="https://raw.github.com/TawiBoii05/ShuuZone-bot/master/owner.js" />');
$('body').prepend('<script type="text/javascript" id="Ping-js" src="https://raw.github.com/TawiBoii05/ShuuZone-bot/master/ping.js" />');
$('body').prepend('<script type="text/javascript" id="Hugme-js" src="http://pastebin.com/raw.php?i=X6h7YNWx" />');
$('body').prepend('<script type="text/javascript" id="cheers-js" src="https://raw.github.com/TawiBoii05/ShuuZone-bot/master/cheers.js" />');
$('body').prepend('<script type="text/javascript" id="fortune-js" src="https://raw.github.com/TawiBoii05/ShuuZone-bot/master/fortune" />');
$('body').prepend('<script type="text/javascript" id="flipcoin-js" src="https://raw.github.com/TawiBoii05/ShuuZone-bot/master/flipcoin.js" />');
$('body').prepend('<script type="text/javascript" id="8ball-js" src="http://pastebin.com/raw.php?i=SC0uYENr" />');
$('body').prepend('<script type="text/javascript" id="Modlist-js" src="https://raw.github.com/TawiBoii05/ShuuZone-bot/master/modlist.js" />');
$('body').prepend('<script type="text/javascript" id="update-js" src="https://raw.github.com/TawiBoii05/ShuuZone-bot/master/update.js" />');
$('body').prepend('<script type="text/javascript" id="test-js" src="https://raw.github.com/TawiBoii05/ShuuZone-bot/master/test.js" />');
$('body').prepend('<script type="text/javascript" id="up-js" src="https://raw.github.com/TawiBoii05/ShuuZone-bot/master/stepup.js" />');
$('body').prepend('<script type="text/javascript" id="down-js" src="https://raw.github.com/TawiBoii05/ShuuZone-bot/master/stepdown.js" />');
$('body').prepend('<script type="text/javascript" id="upreply-js" src="https://raw.github.com/TawiBoii05/ShuuZone-bot/master/upreply.js" />');
$('body').prepend('<script type="text/javascript" id="downreply-js" src="https://raw.github.com/TawiBoii05/ShuuZone-bot/master/downreply.js" />');
$('body').prepend('<style type="text/css" id="plug-css">' + "\n" + styles.join("\n") + "\n" + '</style>');
$('body').append('
$('body').append('<script type="text/javascript" id="plug-js-extra">' + "\n" + scripts.join("\n") + "\n" + '</script>');
The text was updated successfully, but these errors were encountered: