mirror of
https://github.com/AMNatty/Mastodon-Circles.git
synced 2024-11-22 02:57:25 -07:00
Changed Download Mechanism
This commit is contained in:
parent
ea901caa8b
commit
04a48d5ba7
1 changed files with 1 additions and 10 deletions
|
@ -172,14 +172,5 @@ function httpRequest(url, callback, callbackVal=null)
|
|||
|
||||
function downloadImage() {
|
||||
var canvas = document.getElementById("canvas");
|
||||
// Convert the canvas to data
|
||||
var image = canvas.toDataURL();
|
||||
// Create a link
|
||||
var aDownloadLink = document.createElement('a');
|
||||
// Add the name of the file to the link
|
||||
aDownloadLink.download = 'mastodon-circle.png';
|
||||
// Attach the data to the link
|
||||
aDownloadLink.href = image;
|
||||
// Get the code to click the download link
|
||||
aDownloadLink.click();
|
||||
window.open(canvas.toDataURL('image/png'));
|
||||
}
|
Loading…
Reference in a new issue