paradoxxxzero_butterfly/coffees/ext/close_confirm.coffee
2015-10-07 16:38:29 +02:00

6 lines
246 B
CoffeeScript

addEventListener 'beforeunload', (e) ->
unless (butterfly.body.classList.contains('dead') or
location.href.indexOf('session') > -1)
e.returnValue = 'This terminal is active and not in session.
Are you sure you want to kill it?'