From 92f59149b7982b5a6aad6efd39c648cc8582a900 Mon Sep 17 00:00:00 2001 From: Julie Lala Date: Sun, 25 Jan 2015 22:04:39 -0500 Subject: onbeforeunload --- js/app.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'js/app.js') diff --git a/js/app.js b/js/app.js index 96faa7b..a9f7bb7 100644 --- a/js/app.js +++ b/js/app.js @@ -56,6 +56,10 @@ function bind () { if (current_tool.name != 'shader') { cursor_input.focus() } document.body.classList.remove('loading') }) + + window.onbeforeunload = function() { + return "Are you sure you want to navigate away?"; + } } init() -- cgit v1.2.3-70-g09d2