alert('Failed to store example contract in browser. Remix will not work properly. Please ensure Remix has access to LocalStorage. Safari in Private mode is known not to work.')
alert('Failed to store example contract in browser. Remix will not work properly. Please ensure Remix has access to LocalStorage. Safari in Private mode is known not to work.')
}
}
}
}
...
@@ -123,11 +134,16 @@ var run = function () {
...
@@ -123,11 +134,16 @@ var run = function () {
console.log('comparing to cloud',key,resp)
console.log('comparing to cloud',key,resp)
if(typeofresp[key]!=='undefined'&&obj[key]!==resp[key]&&confirm('Overwrite "'+key+'"? Click Ok to overwrite local file with file from cloud. Cancel will push your local file to the cloud.')){
if(typeofresp[key]!=='undefined'&&obj[key]!==resp[key]&&confirm('Overwrite "'+key+'"? Click Ok to overwrite local file with file from cloud. Cancel will push your local file to the cloud.')){
if(confirm('Are you sure you want to publish all your files anonymously as a public gist on github.com?')){
if(confirm('Are you sure you want to publish all your files anonymously as a public gist on github.com?')){
varfiles=packageFiles()
packageFiles((error,packaged)=>{
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(error){
console.log(error)
$.ajax({
}else{
url:'https://api.github.com/gists',
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='
type:'POST',
data:JSON.stringify({
$.ajax({
description:description,
url:'https://api.github.com/gists',
public:true,
type:'POST',
files:files
data:JSON.stringify({
})
description:description,
}).done(function(response){
public:true,
if(response.html_url&&confirm('Created a gist at '+response.html_url+' Would you like to open it in a new window?')){
files:packaged
window.open(response.html_url,'_blank')
})
}).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')
}
}).fail(function(xhr,text,err){
alert('Failed to create gist: '+(err||'Unknown transport error'))
})
}
}
}).fail(function(xhr,text,err){
alert('Failed to create gist: '+(err||'Unknown transport error'))
returnyo`<div><div>This feature allows to interact with your file system from Remix. Once the connection is made the shared folder will be available in the file explorer under <i>localhost</i></div>
<div><i>Remixd</i> first has to be run in your local computer. See <a href="http://remix.readthedocs.io/en/latest/tutorial_mist.html">http://remix.readthedocs.io/en/latest/remixd.html</a> for more details.</div>
<div>Accepting this dialog will start a session between <i>${window.location.href}</i> and your local file system <i>ws://127.0.0.1:65520</i></div>
<div>Please be sure your system is secured enough (port 65520 neither opened nor forwarded).</div>
<div><i class="fa fa-link"></i> will update the connection status.</div>
<div>This feature is still alpha, we recommend to keep a copy of the shared folder.</div>