// ----------------- tabbed menu -------------------
// ----------------- tabbed menu -------------------
$('#options li').click(function(ev){
$('#options li').click(function(ev){
var$el=$(this);
var$el=$(this);
varmatch=/[a-z]+View/.exec($el.get(0).className);
varmatch=/[a-z]+View/.exec($el.get(0).className);
if(!match)return;
if(!match)return;
varcls=match[0];
varcls=match[0];
if(!$el.hasClass('active')){
if(!$el.hasClass('active')){
...
@@ -106,11 +107,11 @@ var run = function() {
...
@@ -106,11 +107,11 @@ var run = function() {
// ------------------ gist publish --------------
// ------------------ gist publish --------------
$('#gist').click(function(){
$('#gist').click(function(){
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=editor.packageFiles();
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=";
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({
$.ajax({
url:'https://api.github.com/gists',
url:'https://api.github.com/gists',
...
@@ -120,24 +121,25 @@ var run = function() {
...
@@ -120,24 +121,25 @@ var run = function() {
public:true,
public:true,
files:files
files:files
})
})
}).done(function(response){
}).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?")){
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');
window.open(response.html_url,'_blank');
}
}
});
});
}
}
});
});
$('#copyOver').click(function(){
$('#copyOver').click(function(){
vartarget=prompt(
vartarget=prompt(
"To which other browser-solidity instance do you want to copy over all files?",
'To which other browser-solidity instance do you want to copy over all files?',
if(typeofresp[key]!='undefined'&&obj[key]!==resp[key]&&confirm("Overwrite '"+fileNameFromKey(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 "'+fileNameFromKey(key)+'"? Click Ok to overwrite local file with file from cloud. Cancel will push your local file to the cloud.')){