// ----------------- tabbed menu -------------------
$('#options li').click(function(ev){
$('#options li').click(function(ev){
var$el=$(this);
varmatch=/[a-z]+View/.exec($el.get(0).className);
varmatch=/[a-z]+View/.exec($el.get(0).className);
if(!match)return;
varcls=match[0];
if(!$el.hasClass('active')){
...
...
@@ -106,11 +106,11 @@ var run = function() {
// ------------------ 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?')){
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({
url:'https://api.github.com/gists',
...
...
@@ -120,15 +120,15 @@ var run = function() {
public:true,
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?')){
window.open(response.html_url,'_blank');
window.open(response.html_url,'_blank');
}
});
}
});
$('#copyOver').click(function(){
$('#copyOver').click(function(){
vartarget=prompt(
'To which other browser-solidity instance do you want to copy over all files?',
@@ -11,20 +11,20 @@ function StorageHandler(updateFiles) {
varcount=0
vardont=0;
functioncheck(key){
chrome.storage.sync.get(key,function(resp){
functioncheck(key){
chrome.storage.sync.get(key,function(resp){
console.log('comparing to cloud',key,resp);
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.')){