forked from GithubMirrors/cardconjurer
		
	Update creator-17.js
This commit is contained in:
		| @@ -1,7 +1,7 @@ | |||||||
| //URL Params | //URL Params | ||||||
| var params = new URLSearchParams(window.location.search); | var params = new URLSearchParams(window.location.search); | ||||||
| const debugging = params.get('debug') != null; | const debugging = params.get('debug') != null; | ||||||
| if (debugging) {alert('debugging - 2.3');} | if (debugging) {alert('debugging - 2.4');} | ||||||
|  |  | ||||||
| //To save the server from being overloaded? Maybe? | //To save the server from being overloaded? Maybe? | ||||||
| function fixUri(input) { | function fixUri(input) { | ||||||
| @@ -1295,9 +1295,6 @@ async function downloadCard() { | |||||||
| 		} | 		} | ||||||
| 		imageName += '.png'; | 		imageName += '.png'; | ||||||
| 		downloadElement.download = imageName; | 		downloadElement.download = imageName; | ||||||
| 		if (debugging) { |  | ||||||
| 			// alert(`el.download: "${downloadElement.download}"\nexpected el.download: "${imageName}.png"`); |  | ||||||
| 		} |  | ||||||
| 		downloadElement.href = cardCanvas.toDataURL(); | 		downloadElement.href = cardCanvas.toDataURL(); | ||||||
| 		if (debugging) { | 		if (debugging) { | ||||||
| 			console.log(imageName); | 			console.log(imageName); | ||||||
| @@ -1305,6 +1302,7 @@ async function downloadCard() { | |||||||
| 			downloadElement.href = downloadElement.href.replace(/^data:image\/png/, `data:application/octet-stream;headers=Content-Disposition%3A%20attachment%3B%20filename=${imageName}`); | 			downloadElement.href = downloadElement.href.replace(/^data:image\/png/, `data:application/octet-stream;headers=Content-Disposition%3A%20attachment%3B%20filename=${imageName}`); | ||||||
| 			console.log(downloadElement.href.split(';')[0]); | 			console.log(downloadElement.href.split(';')[0]); | ||||||
| 			console.log(downloadElement.href.split(';')[1]); | 			console.log(downloadElement.href.split(';')[1]); | ||||||
|  | 			console.log(downloadElement); | ||||||
| 		} | 		} | ||||||
| 		document.body.appendChild(downloadElement); | 		document.body.appendChild(downloadElement); | ||||||
| 		await downloadElement.click(); | 		await downloadElement.click(); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Kyle
					Kyle