text: function shareModalStart(){$("#share-modal").foundation("reveal","open"),update_url(),new Clipboard("#copy-button")}function update_url(){var a=$("#shareUrl");a.val(window.location.href),a.select().focus()}!function(window,document,$){"use strict";var Room=function(){this.init()};Room.prototype.init=function(){this.$section=$(".room__section"),this.$editor=$("#editor-container"),this.$output=$(".room__output-text"),this.$divisor=$("#divisor"),this.$run=$(".run-btn"),this.$runElements=$(".room__header-buttons").children(),this.documentWidth=$(document).width(),this.splitterInit(),this.bindEvents()},Room.prototype.splitterInit=function(){this.$section.split({orientation:"vertical",position:"50%"})},Room.prototype.bindEvents=function(){var a=this;this.$run.on("click",function(){a.runCode()})},Room.prototype.runCode=function(){var code=editor.aceEditor.getValue(),language=editor.getLanguage();if(this.$runElements.toggleClass("active"),webSocket.socket.emit("begin_run"),"javascript"!==language){var url="http://"+document.domain+":"+location.port+"/room/run",data={code:code,runner:language};console.log("Sending: "+data.runner),editor.aceEditor.setReadOnly(!0),$.post(url,data,function(a){console.log("Run - success"),webSocket.socket.emit("end_run",a)}).fail(function(){console.log("Run - Error")})}else{console.log("Compiling: "+language);try{webSocket.socket.emit("end_run",eval(code)),this.$runElements.toggleClass("active")}catch(e){webSocket.socket.emit("end_run",e.message)}}},Room.prototype.writeOutput=function(a){this.$runElements.toggleClass("active"),editor.aceEditor.setReadOnly(!1),this.$output.html(a)},window.Room=Room}(window,document,$),$(".share-footer").click(function(){shareModalStart()}),$("#shareUrl").click(function(){this.select()});