From ae41eba7fca4889c09a65bb8bd73320f465bc29e Mon Sep 17 00:00:00 2001 From: Lars Martens Date: Sun, 11 Jun 2017 17:08:05 +0200 Subject: [PATCH] Exit confirmation --- js/main.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/main.js b/js/main.js index dfc2d06..bdd672a 100644 --- a/js/main.js +++ b/js/main.js @@ -85,7 +85,12 @@ $(document).ready(function(){ setup(); updateUI(); render(); - + + // Confirm exit + window.onbeforeunload = function(){ + return "Changes will NOT be saved. Exit anyways?"; + }; + //Stuff to handle and update input $("input").on("input", function(){ handleInput();