From 04a48d5ba74c2b38136f7c589fb8094598790b77 Mon Sep 17 00:00:00 2001 From: Andreas Grasser Date: Sat, 19 Nov 2022 21:17:52 +0100 Subject: [PATCH] Changed Download Mechanism --- create-circle.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/create-circle.js b/create-circle.js index 4355ffd..8eb7dcb 100644 --- a/create-circle.js +++ b/create-circle.js @@ -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')); } \ No newline at end of file