kopia lustrzana https://github.com/backface/turtlestitch
Commented out popup
rodzic
f56dc8ecf5
commit
d3ec80f374
21
morphic.js
21
morphic.js
|
@ -10353,16 +10353,17 @@ WorldMorph.prototype.initEventListeners = function () {
|
||||||
false
|
false
|
||||||
);
|
);
|
||||||
|
|
||||||
window.onbeforeunload = function (evt) {
|
// window.onbeforeunload = function (evt) {
|
||||||
var e = evt || window.event,
|
// var e = evt || window.event,
|
||||||
msg = "Are you sure you want to leave?";
|
// msg = "Are you sure you want to leave?";
|
||||||
// For IE and Firefox
|
// // For IE and Firefox
|
||||||
if (e) {
|
// if (e) {
|
||||||
e.returnValue = msg;
|
// e.returnValue = msg;
|
||||||
}
|
// }
|
||||||
// For Safari / chrome
|
// // For Safari / chrome
|
||||||
return msg;
|
// return msg;
|
||||||
};
|
// };
|
||||||
|
window.onbeforeunload = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
WorldMorph.prototype.mouseDownLeft = function () {
|
WorldMorph.prototype.mouseDownLeft = function () {
|
||||||
|
|
|
@ -4764,7 +4764,14 @@ StageMorph.prototype.userMenu = function () {
|
||||||
menu.addItem(
|
menu.addItem(
|
||||||
"pic...",
|
"pic...",
|
||||||
function () {
|
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'
|
'open a new window\nwith a picture of the stage'
|
||||||
);
|
);
|
||||||
|
|
Ładowanie…
Reference in New Issue