updatePublishStatus('File is '+percent.toFixed(2)+'% loaded to the server');
});
/* socket.io message listeners */
socket.on('publish-status',function(msg){
updatePublishStatus(msg);
});
socket.on('publish-failure',function(msg){
document.getElementById('publish-active-area').innerHTML='<p>'+JSON.stringify(msg)+'</p><p> --(✖╭╮✖)→ </p><strong>For help, post the above error text in the #speech channel on the <a href="https://lbry.slack.com/" target="_blank">lbry slack</a></strong>';
});
socket.on('publish-complete',function(msg){
varpublishResults='<p>Your publish is complete!</p>';
publishResults+='<p><strong>NOTE: the transaction still needs to be mined by the network before you can access it! This will take a few minutes. To view the transaction on the blockchain explorer click the Transaction ID link below.</strong></p>';
publishResults+='<p>Your Transaction ID is: <a target="_blank" href="https://explorer.lbry.io/#!/transaction?id='+msg.result.txid+'">'+msg.result.txid+'</a></p>';
publishResults+='<p>Your Claim ID is: '+msg.result.claim_id+'</p>';
publishResults+='<p>Here is a link to the claim where your asset will be published: <a target="_blank" href="https://spee.ch/'+msg.name+'">spee.ch/'+msg.name+'</a></p>';
publishResults+='<p>Here is a direct link to where your asset will be stored: <a target="_blank" href="https://spee.ch/'+msg.name+'/'+msg.result.claim_id+'">spee.ch/'+msg.name+'/'+msg.result.claim_id+'</a></p>';
publishResults+='<p><a href="/">Reload to publish another asset</a></p>';