From d1b6c67dc3a6aef73739a077bd7c26a3bad11cd6 Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 6 Sep 2021 00:13:52 +0200 Subject: [PATCH] fix misnomer --- copyparty/web/util.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/copyparty/web/util.js b/copyparty/web/util.js index ffd4e7b0..d3a2e4eb 100644 --- a/copyparty/web/util.js +++ b/copyparty/web/util.js @@ -842,14 +842,14 @@ var toast = (function () { r.visible = false; }; - r.show = function (cl, ms, txt) { + r.show = function (cl, sec, txt) { clearTimeout(te); - if (ms) - te = setTimeout(r.hide, ms * 1000); + if (sec) + te = setTimeout(r.hide, sec * 1000); obj.innerHTML = 'x
' + lf2br(txt) + '
'; obj.className = cl; - ms += obj.offsetWidth; + sec += obj.offsetWidth; obj.className += ' vis'; ebi('toastc').onclick = r.hide; timer.add(scrollchk); @@ -857,17 +857,17 @@ var toast = (function () { r.txt = txt; }; - r.ok = function (ms, txt) { - r.show('ok', ms, txt); + r.ok = function (sec, txt) { + r.show('ok', sec, txt); }; - r.inf = function (ms, txt) { - r.show('inf', ms, txt); + r.inf = function (sec, txt) { + r.show('inf', sec, txt); }; - r.warn = function (ms, txt) { - r.show('warn', ms, txt); + r.warn = function (sec, txt) { + r.show('warn', sec, txt); }; - r.err = function (ms, txt) { - r.show('err', ms, txt); + r.err = function (sec, txt) { + r.show('err', sec, txt); }; return r;