summaryrefslogtreecommitdiff
path: root/objects.js
diff options
context:
space:
mode:
Diffstat (limited to 'objects.js')
-rw-r--r--objects.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/objects.js b/objects.js
index ea07e6e..c4e857c 100644
--- a/objects.js
+++ b/objects.js
@@ -4764,7 +4764,14 @@ StageMorph.prototype.userMenu = function () {
menu.addItem(
"pic...",
function () {
- window.open(myself.fullImageClassic().toDataURL());
+ //window.open();
+ //window.location.href =
+ var ref = myself.fullImageClassic().toDataURL().replace(/^data:image\/[^;]/, 'data:application/octet-stream');
+ var link = document.createElement('a');
+ link.download = 'download.png';
+ link.href = ref;
+ link.click();
+ console.log("here");
},
'open a new window\nwith a picture of the stage'
);