Skip to content

Commit

Permalink
Merge pull request Goctionni#3 from kllocal/master
Browse files Browse the repository at this point in the history
Do not upload image to imgur
  • Loading branch information
EndlessEden authored Feb 12, 2019
2 parents 5a36660 + cc3d184 commit 419888e
Showing 1 changed file with 3 additions and 27 deletions.
30 changes: 3 additions & 27 deletions v1.0.2.html
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ <h1>Kink list</h1>
</div>
<div id="ExportWrapper">
<input type="text" id="URL">
<button id="Export">Export</button>
<button id="Export">Create image</button>
<div id="Loading">Loading</div>
</div>
<button id="StartBtn"></button>
Expand Down Expand Up @@ -1117,32 +1117,8 @@ <h3 id="InputField"></h3>
}
}

//return $(canvas).insertBefore($('#InputList'));

// Send canvas to imgur
$.ajax({
url: 'https://api.imgur.com/3/image',
type: 'POST',
headers: {
// Your application gets an imgurClientId from Imgur
Authorization: 'Client-ID ' + imgurClientId,
Accept: 'application/json'
},
data: {
// convert the image data to base64
image: canvas.toDataURL().split(',')[1],
type: 'base64'
},
success: function(result) {
$('#Loading').hide();
var url = 'https://i.imgur.com/' + result.data.id + '.png';
$('#URL').val(url).fadeIn();
},
fail: function(){
$('#Loading').hide();
alert('Failed to upload to imgur, could not connect');
}
});
$('#Loading').hide();
return $(canvas).insertBefore($('#InputList'));
},
encode: function(base, input){
var hashBase = inputKinks.hashChars.length;
Expand Down

0 comments on commit 419888e

Please sign in to comment.