(function(window){ 'use strict'; var ws = new window.SS((window.location.protocol === 'https:' ? 'wss':'ws')+'://'+window.location.host+'/socket'), get = function(selector){ return document.querySelector(selector); }, rand = function(min, max){ return Math.floor(Math.random() * (max - min + 1) + min); }, abToStr = function(ab){ return String.fromCharCode.apply(null, new Uint8Array(ab)); }, strToAB = function(str) { var buf = new ArrayBuffer(str.length); var dv = new DataView(buf); for (var i=0, strLen=str.length; i