The connection has been closed because the server is restarting. Please wait while you automatically reconnect.
'),"hardrestart"==s&&setTimeout(function(){runByond("byond://winset?command=.reconnect"),output('Auto reconnecting from hard restart...')},6e4);else if("stopaudio"==s)$(".dectalk").remove(),window.HTMLAudioElement&&$playMusic.get(0).pause();else{try{t=$.parseJSON(s)}catch(e){return void triggerError("(ehjaxCallback data) JSON parse error for: "+s+". "+e)}if((s=t).clientData)opts.restarting&&(opts.restarting=!1,$(".connectionClosed.restarting:not(.restored)").addClass("restored").text("The round restarted and you successfully reconnected!")),(s.clientData.ckey||s.clientData.ip||s.clientData.compid)&&handleClientData(s.clientData.ckey,s.clientData.ip,s.clientData.compid);else if(s.changeTheme)changeTheme(s.changeTheme);else if(s.loadAdminCode)opts.adminLoaded||(o=s.loadAdminCode,$("body").append(o),opts.adminLoaded=!0);else if(s.loadPerfMon)opts.perfMonLoaded||(o=s.loadPerfMon,$("body").append(o),opts.perfMonLoaded=!0);else if(s.modeChange)changeMode(s.modeChange);else if(s.firebug){s.trigger?output('Loading firebug console, triggered by '+s.trigger+"..."):output('Loading firebug console...');var n=document.createElement("script");n.src="https://getfirebug.com/firebug-lite-debug.js",document.body.appendChild(n)}else if(s.dectalk){n='';output(n=s.decTalkTrigger?'You hear a strange robotic voice...'+n:n,"preventLink")}else if(s.playMusic)if(window.HTMLAudioElement)try{("number"!=typeof s.volume||s.volume<0||1Your IE version is too old for this music. Please upgrade to IE 9+.');else s.adjustVolume,"number"!=typeof s.adjustVolume||s.adjustVolume<0||1'+e+' ');var s=$("#popup"+opts.popups),e=s.outerHeight();s.css({height:e+"px",margin:"-"+e/2+"px 0 0 -"+t/2+"px"}),s.on("click",".close",function(e){e.preventDefault(),s.remove()})}function toggleWasd(e){opts.wasd="on"==e}Date.now||(Date.now=function(){return(new Date).getTime()}),"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),"undefined"==typeof $&&(div=document.getElementById("loading").childNodes[1],div+="
ERROR: Jquery did not load.");var readyCalled=!1;$(function(){var e,t,s,o;readyCalled||(readyCalled=!0,$messages=$("#messages"),$subOptions=$("#subOptions"),$playMusic=$("#play-music"),setInterval(function(){var e;opts.pingCounter>=opts.pingLimit&&!opts.restarting?(e=(opts.pongTime-opts.pingTime)/2,opts.pingCounter=0,opts.pongTime=0,opts.pingTime=Date.now(),runByond("?action=ehjax&window=browseroutput&type=datum&datum=chatOutput&proc=ping¶m[last_ping]="+e),setTimeout(function(){opts.pongTime?opts.noResponse&&($('.connectionClosed[data-count="'+opts.noResponseCount+'"]:not(.restored)').addClass("restored").text("Your connection has been restored (probably)!"),opts.noResponse=!1):opts.noResponse||(opts.noResponse=!0,opts.noResponseCount++,output('
You are either experiencing lag or the connection has closed.
'))},1e4)):opts.pingCounter++},1e3),(o={sfontSize:getCookie("fontsize"),sfontType:getCookie("fonttype"),spingDisabled:getCookie("pingdisabled"),shighlightTerms:getCookie("highlightterms"),shighlightColor:getCookie("highlightcolor"),stheme:getCookie("theme"),smessageLimitEnabled:getCookie("messageLimitEnabled")}).sfontSize&&($messages.css("font-size",o.sfontSize),output('Loaded font size setting of: '+o.sfontSize+"")),o.sfontType&&($messages.css("font-family",o.sfontType),output('Loaded font type setting of: '+o.sfontType+"")),o.spingDisabled&&("true"==o.spingDisabled&&(opts.pingDisabled=!0,$("#ping").hide()),output('Loaded ping display of: '+(opts.pingDisabled?"hidden":"visible")+"")),!o.shighlightTerms||(t=0!=(e=$.parseJSON(o.shighlightTerms).filter(function(e){return null!==e&&/\S/.test(e)})).length?e.join(", "):null)&&(output('Loaded highlight strings of: '+t+""),opts.highlightTerms=e),o.shighlightColor&&(opts.highlightColor=o.shighlightColor,output('Loaded highlight color of: '+o.shighlightColor+"")),o.stheme&&((s=$("body")).removeClass(opts.currentTheme),s.addClass(o.stheme),opts.currentTheme=o.stheme,output('Loaded theme setting of: '+themes[o.stheme]+"")),o.smessageLimitEnabled&&(opts.messageLimitEnabled=o.smessageLimitEnabled),function(){var e,t=getCookie("connData");if(t){try{e=$.parseJSON(t)}catch(e){return triggerError("(cookie connData) JSON parse error for: "+t+". "+e)}opts.clientData=e}}(),$("body").on("click","a",function(e){e.preventDefault()}),$("body").on("mousedown",function(e){var t=$(e.target);if($contextMenu&&opts.hasOwnProperty("contextMenuTarget")&&opts.contextMenuTarget)return hideContextMenu(),!1;t.is("a")||t.parent("a").length||t.is("input")||t.is("textarea")?opts.preventFocus=!0:(opts.preventFocus=!1,opts.mouseDownX=e.pageX,opts.mouseDownY=e.pageY)}),$messages.on("mousedown",function(e){$subOptions&&$subOptions.is(":visible")&&($subOptions.slideUp("fast",function(){$(this).removeClass("scroll"),$(this).css("height","")}),clearInterval(opts.subOptionsLoop))}),$("body").on("mouseup",function(e){!opts.preventFocus&&e.pageX>=opts.mouseDownX-opts.clickTolerance&&e.pageX<=opts.mouseDownX+opts.clickTolerance&&e.pageY>=opts.mouseDownY-opts.clickTolerance&&e.pageY<=opts.mouseDownY+opts.clickTolerance&&(opts.mouseDownX=null,opts.mouseDownY=null,runByond("byond://winset?mainwindow.input.focus=true"))}),$messages.on("click","a",function(e){e.preventDefault();e=$(this).attr("href");"?"==e[0]||8<=e.length&&"byond://"==e.substring(0,8)?runByond(e):runByond("?action=openLink&link="+(e=escaper(e)))}),$("body").on("keydown",function(e){if("INPUT"!=e.target.nodeName&&"TEXTAREA"!=e.target.nodeName&&!(e.ctrlKey||e.altKey||e.shiftKey)){var t=String.fromCharCode(e.which);return runByond(t?"byond://winset?mainwindow.input.focus=true;mainwindow.input.text="+(t=!e.shiftKey?t.toLowerCase():t):"byond://winset?mainwindow.input.focus=true"),!1}}),$(window).on("resize",function(e){$(this).height()!==opts.priorChatHeight&&($("body,html").scrollTop($messages.outerHeight()),opts.priorChatHeight=$(this).height())}),$messages.on("click",".stopAudio",function(){var e=$(this).parent().children("audio");e&&e.remove()}),$(window).on("scroll",function(){var e=$("body").height(),t=$messages.outerHeight();e+$("body,html").scrollTop()>=t-opts.scrollSnapTolerance&&$("#newMessages").length&&$("#newMessages").remove()}),$("body").on("click","#newMessages",function(e){var t=$messages.outerHeight();$("body,html").scrollTop(t),$("#newMessages").remove()}),$("#toggleOptions").click(function(e){$subOptions.is(":visible")?($subOptions.slideUp("fast",function(){$(this).removeClass("scroll"),$(this).css("height","")}),clearInterval(opts.subOptionsLoop)):($subOptions.slideDown("fast",function(){var e=$(window).height(),t=$("#toggleOptions").outerHeight(),s=$subOptions.outerHeight(),o=e-t;$(this).height(o),e-tFont size set to '+t+"")}),$("#increaseFont").click(function(e){var t=(t=parseInt($messages.css("font-size")))+1+"px";$messages.css({"font-size":t}),setCookie("fontsize",t,365),output('Font size set to '+t+"")}),$("#chooseFont").click(function(e){$(".popup .changeFont").is(":visible")||createPopup('
",200))}),$("body").on("click","#changeTheme a",function(e){changeTheme($(this).attr("data-theme"))}),$("#togglePing").click(function(e){opts.pingDisabled?($("#ping").slideDown("fast"),opts.pingDisabled=!1):($("#ping").slideUp("fast"),opts.pingDisabled=!0),setCookie("pingdisabled",opts.pingDisabled?"true":"false",365)}),$("#toggleMessageLimit").click(function(e){opts.messageLimitEnabled=!opts.messageLimitEnabled,setCookie("messageLimitEnabled",opts.messageLimitEnabled,365),output(''+(opts.messageLimitEnabled?"Old messages will get deleted.":"Old messages no longer get deleted. This might cause performance issues.")+"")}),$("#saveLog").click(function(e){var t="";xmlHttp=window.XMLHttpRequest?new XMLHttpRequest:new ActiveXObject("Microsoft.XMLHTTP"),xmlHttp.open("GET","https://assets.station13.ru/goon/css/browserOutput.css",!1),xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded"),xmlHttp.send(),t+="",t+='',t+=$messages.html(),t+="";var s=new Date,s="log_"+s.getFullYear()+"-"+(s.getMonth()+1)+"-"+s.getDate()+"_"+s.getHours()+"-"+s.getMinutes()+".html";navigator.msSaveBlob(new Blob([t],{type:"text/html"}),s)}),$("#highlightTerm").click(function(e){if(!$(".popup .highlightTerm").is(":visible")){for(var t="",s=0;s';createPopup('
String Highlighting
Choose up to '+opts.highlightLimit+' strings that will highlight the line when they appear in chat. Regex is supported.
',250)}}),$("body").on("keyup","#highlightColor",function(){var e=$("#highlightColor").val();(e=e.trim())&&"#"==e.charAt(0)&&$("#highlightColor").css("background-color",e)}),$("body").on("submit","#highlightTermForm",function(e){e.preventDefault(),opts.highlightTerms=[];for(var t=0;tBYOND uses IE for interfaces and we\'ve detected yours is very old. Please consider upgrading or some stuff might be broken for you!'),runByond("?action=ehjax&type=datum&datum=chatOutput&proc=doneLoading¶m[ua]="+escaper(navigator.userAgent)),$("#loading").is(":visible")&&$("#loading").remove(),$("#userBar").show(),opts.priorChatHeight=$(window).height())});