diff options
Diffstat (limited to 'morphic.js')
| -rw-r--r-- | morphic.js | 21 |
1 files changed, 10 insertions, 11 deletions
@@ -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 () { |
