self.addEventListener("message",function(e){e=e.data;if("check"===e.cmd)try{WebSocket?self.postMessage({result:!0}):self.postMessage({result:!1})}catch(err){self.postMessage({result:!1})}else console.log("worker got unknown message: "+e.cmd)},!1);