1
0
mirror of https://gitlab.com/Deukhoofd/BattleSim.git synced 2025-09-02 08:57:19 +00:00
BattleSim/client/app/js/concerns/exit_while_in_battle.coffee
2016-02-01 23:19:30 +01:00

8 lines
195 B
CoffeeScript

# Prevents a clean escape while you're in a battle.
$(window).on 'beforeunload', ->
if PokeBattle.battles.isPlaying()
"You are currently in a battle."
else
# Do not prompt
return