modalDialogCustom.alert('Remix requires an access token (which includes gists creation permission). Please go to the settings tab for more information.')
}else{
vardescription='Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. \n Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version='+queryParams.get().version+'&optimize='+queryParams.get().optimize+'&gist='
console.log(packaged)
minixhr({
url:'https://api.github.com/gists',
method:'POST',
data:JSON.stringify({
vargists=newGists({
token:tokenAccess
})
if(id){
tooltip('Saving gist ('+id+') ...')
gists.edit({
description:description,
public:true,
files:packaged,
id:id
},(error,result)=>{
cb(error,result)
})
}else{
tooltip('Creating a new gist ...')
gists.create({
description:description,
public:true,
files:packaged
},(error,result)=>{
cb(error,result)
})
},cb)
}
}
}
})
}
modalDialogCustom.confirm(null,'Are you very sure you want to publish all your files anonymously as a public gist on github.com?',()=>{
toGist()
functioncb(error,data){
if(error){
modalDialogCustom.alert('Failed to manage gist: '+error)
}else{
if(data.html_url){
modalDialogCustom.confirm(null,`The gist is at ${data.html_url}. Would you like to open it in a new window?`,()=>{