revert to anonymous gists

pull/1/head
d11e9 9 years ago
parent f76af79ca2
commit 489f45aa1b
  1. 18
      index.html

@ -146,19 +146,7 @@ THE SOFTWARE.
$('#gist').click(function(){
//Get Github Authorization Token with proper scope, print to console
var note = ((new Date()).toString() + Math.random().toString());
var description = "Ethereum Contracts Gist created using soleditor at: https://chriseth.github.io/browser-solidity";
$.ajax({
url: 'https://api.github.com/authorizations',
type: 'POST',
beforeSend: function(xhr) {
xhr.setRequestHeader("Authorization", "Basic " + "c29sZWRpdG9yOmRlY2VudHJhbGlzZWV2ZXJ5dGhpbmc=");
},
data: JSON.stringify({
scopes:["gist"],
note: note
})
}).done(function(response) {
//Create a Gist with token from above
var files = {};
var filesArr = getFiles();
@ -173,16 +161,12 @@ THE SOFTWARE.
$.ajax({
url: 'https://api.github.com/gists',
type: 'POST',
beforeSend: function(xhr) {
xhr.setRequestHeader("Authorization", "token " + response.token);
},
data: data
}).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 );
window.open( response.html_url, '_blank' );
}
});
});
})

Loading…
Cancel
Save