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