From 7319d091e2090ee3549f8a8f922136d4b910295a Mon Sep 17 00:00:00 2001 From: Miguel N Date: Wed, 27 Jan 2021 02:01:59 +0000 Subject: [PATCH] Add exit popup --- public/js/unsaved.js | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 public/js/unsaved.js diff --git a/public/js/unsaved.js b/public/js/unsaved.js new file mode 100644 index 0000000..7406b14 --- /dev/null +++ b/public/js/unsaved.js @@ -0,0 +1,4 @@ +// Load this on all pages requiring exit confirmation. +$(window).bind('beforeunload', function(){ + return "Are you sure you want to exit this page? You might have unsaved work."; +}); \ No newline at end of file