diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-04-23 21:36:10 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-04-23 21:36:10 -0700 |
commit | e3afbd56399e12beb37246a879dcf817de9b4ca1 (patch) | |
tree | 42d6492064a411450a1cf9ecea4aca0593d8a71d /web/static/dartboat.js | |
parent | e2fe11469394c9827a0cdea9966188c833d93197 (diff) | |
download | dartboat-e3afbd56399e12beb37246a879dcf817de9b4ca1.tar.gz dartboat-e3afbd56399e12beb37246a879dcf817de9b4ca1.tar.xz |
web: allow undo for complete matches
Diffstat (limited to 'web/static/dartboat.js')
-rw-r--r-- | web/static/dartboat.js | 11 |
1 files changed, 11 insertions, 0 deletions
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: { |