From e3afbd56399e12beb37246a879dcf817de9b4ca1 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Sat, 23 Apr 2022 21:36:10 -0700 Subject: web: allow undo for complete matches --- web/static/dartboat.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'web/static') diff --git a/web/static/dartboat.js b/web/static/dartboat.js index 016742b..358446a 100644 --- a/web/static/dartboat.js +++ b/web/static/dartboat.js @@ -125,9 +125,20 @@ let prompt_handlers = { }, match_over: { + undo() { + let cl = document.getElementById('key_undo').classList; + if (cl.contains('active')) + Module.ccall('user_undo'); + cl.toggle('active'); + }, + submit() { Module.ccall('match_init'); }, + + pre(action) { + clearOi(); + } }, init: { -- cgit v1.2.3-70-g09d2