summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViraj Mahesh <virajmahesh@gmail.com>2014-04-28 01:11:35 -0700
committerViraj Mahesh <virajmahesh@gmail.com>2014-04-28 01:11:35 -0700
commitcdecbf86aee44226f864efd26fbd0930b309a875 (patch)
tree9c80071c0800180ed03805b76bc642cd1c13737a
parentd3ec80f3748eeed2f6a4f7c75c85d56388171e2a (diff)
downloadsnap-yow-cdecbf86aee44226f864efd26fbd0930b309a875.tar.gz
snap-yow-cdecbf86aee44226f864efd26fbd0930b309a875.zip
Revert f56dc8e..d3ec80f
This rolls back to commit f56dc8ecf5f2845ed40b62eec4e0e2227bebd5ba.
-rw-r--r--morphic.js21
-rw-r--r--objects.js9
2 files changed, 11 insertions, 19 deletions
diff --git a/morphic.js b/morphic.js
index 329c3ed..b55b180 100644
--- a/morphic.js
+++ b/morphic.js
@@ -10353,17 +10353,16 @@ WorldMorph.prototype.initEventListeners = function () {
false
);
- // window.onbeforeunload = function (evt) {
- // var e = evt || window.event,
- // msg = "Are you sure you want to leave?";
- // // For IE and Firefox
- // if (e) {
- // e.returnValue = msg;
- // }
- // // For Safari / chrome
- // return msg;
- // };
- window.onbeforeunload = null;
+ window.onbeforeunload = function (evt) {
+ var e = evt || window.event,
+ msg = "Are you sure you want to leave?";
+ // For IE and Firefox
+ if (e) {
+ e.returnValue = msg;
+ }
+ // For Safari / chrome
+ return msg;
+ };
};
WorldMorph.prototype.mouseDownLeft = function () {
diff --git a/objects.js b/objects.js
index c4e857c..ea07e6e 100644
--- a/objects.js
+++ b/objects.js
@@ -4764,14 +4764,7 @@ StageMorph.prototype.userMenu = function () {
menu.addItem(
"pic...",
function () {
- //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");
+ window.open(myself.fullImageClassic().toDataURL());
},
'open a new window\nwith a picture of the stage'
);