forked from GithubMirrors/cardconjurer
		
	download button
This commit is contained in:
		| @@ -152,6 +152,7 @@ | ||||
| 					<input type="checkbox" id="checkboxSecondWatermarkColor"> Second Watermark Color <select id="secondWatermarkColorSelection"></select></input> | ||||
| 					<br/> | ||||
| 				</div> | ||||
| 				<div class="toggle" onclick="downloadCardImage()" id="downloadCardImage" href="" download="card.jpg">Download</div> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 	</div> | ||||
| @@ -866,5 +867,12 @@ function toggleVisibility(targetClass, self, selfClass, hiddenClass, shownClass) | ||||
| function loadSetSymbol() { | ||||
| 	imgSetSymbol.src = "https://raw.githubusercontent.com/ImKyle4815/MTG-Set-Symbols/master/setSymbols/" + document.getElementById("setSymbolCode").value.toUpperCase() + "_" + document.getElementById("setSymbolRarity").value.toUpperCase() + ".png" | ||||
| } | ||||
|  | ||||
| //Best for last - downloads the image! | ||||
| function downloadCardImage(el) { | ||||
| 	alert("This may not work because the canvas is 'tainted' - if you know how to avoid this please tell me :)") | ||||
| 	var cardImageData = canvas.toDataURL("image/jpg") | ||||
| 	el.href = cardImageData | ||||
| } | ||||
| </script> | ||||
| <html> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Kyle
					Kyle