show current game when warning from full-page menu - fixes #454
This commit is contained in:
parent
02613fac38
commit
d076375c8c
|
@ -19,6 +19,7 @@ module.exports = function(ctrl) {
|
|||
if (game.isPlayerPlaying(d)) {
|
||||
window.addEventListener('beforeunload', function(e) {
|
||||
if (!lichess.hasToReload && !ctrl.data.blind && game.playable(ctrl.data) && ctrl.data.clock) {
|
||||
document.body.classList.remove('fpmenu');
|
||||
ctrl.socket.send('bye');
|
||||
var msg = 'There is a game in progress!';
|
||||
(e || window.event).returnValue = msg;
|
||||
|
|
Loading…
Reference in a new issue