if(confirm('Are you sure you want to publish all your files anonymously as a public gist on github.com?')){
varfiles=editor.packageFiles();
vardescription='Created using browser-solidity: Realtime Ethereum Contract Compiler and Runtime. \n Load this file by pasting this gists URL or ID at https://ethereum.github.io/browser-solidity/#version='+queryParams.get().version+'&optimize='+queryParams.get().optimize+'&gist=';
$.ajax({
url:'https://api.github.com/gists',
type:'POST',
data:JSON.stringify({
description:description,
public:true,
files:files
})
}).done(function(response){
if(response.html_url&&confirm('Created a gist at '+response.html_url+' Would you like to open it in a new window?')){
window.open(response.html_url,'_blank');
}
});
}
});
$('#copyOver').click(function(){
vartarget=prompt(
'To which other browser-solidity instance do you want to copy over all files?',
if(confirm('Are you sure you want to publish all your files anonymously as a public gist on github.com?')){
varnewName=ev.target.value;
$fileNameInputEl.off('blur');
varfiles=editor.packageFiles();
$fileNameInputEl.off('keyup');
vardescription='Created using browser-solidity: Realtime Ethereum Contract Compiler and Runtime. \n Load this file by pasting this gists URL or ID at https://ethereum.github.io/browser-solidity/#version='+queryParams.get().version+'&optimize='+queryParams.get().optimize+'&gist=';
if(newName!==originalName&&confirm('Are you sure you want to rename: '+originalName+' to '+newName+'?')){