summaryrefslogtreecommitdiff
path: root/web/static
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-05-03 21:55:21 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-05-03 21:55:21 -0700
commit2709b070c5fde766c0e9fe98ade169a865e6c9ad (patch)
tree3e8c19cccfbd9fa88b21c8e44e9cd7f7e6d30b9f /web/static
parent1ab3c4995e44f44a845dce7b241554c0621527b9 (diff)
downloaddartboat-2709b070c5fde766c0e9fe98ade169a865e6c9ad.tar.gz
dartboat-2709b070c5fde766c0e9fe98ade169a865e6c9ad.tar.xz
web: oi from c
Diffstat (limited to 'web/static')
-rw-r--r--web/static/dartboat.js18
-rw-r--r--web/static/style.css4
2 files changed, 5 insertions, 17 deletions
diff --git a/web/static/dartboat.js b/web/static/dartboat.js
index 4edba8a..eaf76da 100644
--- a/web/static/dartboat.js
+++ b/web/static/dartboat.js
@@ -1,25 +1,9 @@
const $ = document.querySelector.bind(document);
const $$ = document.querySelectorAll.bind(document);
-let oi_timeout;
-function oi() {
- $('#oi').style.visibility = 'visible';
-
- oi_timeout = setTimeout(() => { oi_timeout = null; clearOi(); }, 3000);
-}
-
-function clearOi() {
- $('#oi').style.visibility = 'hidden';
-
- if (oi_timeout) {
- clearTimeout(oi_timeout);
- oi_timeout = null;
- }
-}
-
function scheduleCCall(f, ms, ...args) {
const func = UTF8ToString(f);
- setTimeout(() => Module[`_${func}`](...args), ms);
+ return setTimeout(() => Module[`_${func}`](...args), ms);
}
function toCString(str) { // caller must free
diff --git a/web/static/style.css b/web/static/style.css
index 43c5b8b..e770c85 100644
--- a/web/static/style.css
+++ b/web/static/style.css
@@ -95,6 +95,10 @@ div#oi {
justify-content: center;
}
+div#oi.visible {
+ visibility: visible;
+}
+
div#info {
position: relative;