Skip to content

Commit

Permalink
use native sync alerts when websocket connection is about to be closed
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed Oct 28, 2024
1 parent fc2a48b commit f550ca7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
5 changes: 2 additions & 3 deletions ui/round/src/ctrl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ import { defined, Toggle, toggle, requestIdleCallback } from 'common';
import { Redraw } from 'common/snabbdom';
import { storage, once, type LichessBooleanStorage } from 'common/storage';
import { pubsub } from 'common/pubsub';
import { alert } from 'common/dialog';

interface GoneBerserk {
white?: boolean;
Expand Down Expand Up @@ -896,9 +895,9 @@ export default class RoundController implements MoveRootCtrl {
}
wakeLock.request();

setTimeout(async () => {
setTimeout(() => {
if ($('#KeyboardO,#show_btn,#shadowHostId').length) {
await alert('Play enhancement extensions are no longer allowed!');
alert('Play enhancement extensions are no longer allowed!');
site.socket.destroy();
this.setRedirecting();
location.href = '/page/play-extensions';
Expand Down
1 change: 0 additions & 1 deletion ui/round/src/round.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { storage } from 'common/storage';
import { setClockWidget } from 'common/clock';
import { makeChat } from 'chat';
import { pubsub } from 'common/pubsub';
import { alert } from 'common/dialog';

const patch = init([classModule, attributesModule]);

Expand Down

0 comments on commit f550ca7

Please sign in to comment.