src/js/MindMaps.js
function addUnloadHook () {
  window.onbeforeunload = function (e) {
    var msg = "Are you sure? Any unsaved progress will be lost."
    e = e || window.event;

    // For IE and Firefox prior to version 4
    if (e) {
      e.returnValue = msg;
    }

    // For Safari
    return msg;
  };
}
function addUnloadHook () {
  window.onbeforeunload = function (e) {
    var msg = "Are you sure? Any unsaved progress will be lost."
    e = e || window.event;

    // For IE and Firefox prior to version 4
    if (e) {
      e.returnValue = msg;
    }

    // For Safari
    return msg;
  };
}
function addUnloadHook ( ) { window . onbeforeunload = function ( e ) { var msg = "Are you sure? Any unsaved progress will be lost." e = e || window . event ; // For IE and Firefox prior to version 4
 if ( e ) { e . returnValue = msg ; } // For Safari
 return msg ; } ; }
Adds a confirmation dialog when the user navigates away from the app.
Adds a confirmation dialog when the user navigates away from the app .