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.")){
// ----------------- tabbed menu -------------------
varobj={}
vardone=false;
varcount=0
vardont=0;
$('#options li').click(function(ev){
functioncheck(key){
var$el=$(this);
chrome.storage.sync.get(key,function(resp){
varmatch=/[a-z]+View/.exec($el.get(0).className);
console.log("comparing to cloud",key,resp)
if(!match)return;
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(ev.target.value=='web3'&&!confirm("Are you sure you want to connect to a local ethereum node?")){
$vmToggle.get(0).checked=true;
executionContext='vm';
}elseexecutionContext=ev.target.value;
compile();
}
// ------------------ 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={};
varfiles={};
varfilesArr=getFiles();
varfilesArr=getFiles();
vardescription="Created using browser-solidity: Realtime Ethereum Contract Compiler and Runtime. \n Load this file by pasting this gists URL or ID at https://chriseth.github.io/browser-solidity/#version="+getQueryParams().version+"&optimize="+getQueryParams().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://chriseth.github.io/browser-solidity/#version="+getQueryParams().version+"&optimize="+getQueryParams().optimize+"&gist=";
for(varfinfilesArr){
files[fileNameFromKey(filesArr[f])]={
content:localStorage[filesArr[f]]
};
}
$.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?")){