13 lines
416 B
JavaScript
13 lines
416 B
JavaScript
|
function saveCanvas() {
|
||
|
saveCanvasButton.download = "image.png";
|
||
|
saveCanvasButton.href = canvas
|
||
|
.toDataURL("image/png")
|
||
|
.replace("image/png", "image/octet-stream");
|
||
|
}
|
||
|
|
||
|
function goFullScreen() {
|
||
|
if (canvas.requestFullScreen) canvas.requestFullScreen();
|
||
|
else if (canvas.webkitRequestFullScreen) canvas.webkitRequestFullScreen();
|
||
|
else if (canvas.mozRequestFullScreen) canvas.mozRequestFullScreen();
|
||
|
}
|