This commit is contained in:
ed 2024-11-08 22:11:33 +00:00
parent 4603afb6de
commit 96edcbccd7
2 changed files with 3 additions and 3 deletions

View file

@ -75,7 +75,7 @@ html {
top: 1px;
right: 1px;
left: 1px;
animation: toastt var(--tmtime) steps(var(--tmstep)) forwards;
animation: toastt var(--tmtime) 0.07s steps(var(--tmstep)) forwards;
transform-origin: right;
}
@keyframes toastt {

View file

@ -1542,8 +1542,8 @@ var toast = (function () {
var html = '';
if (sec) {
setcvar('--tmtime', sec + 's');
setcvar('--tmstep', sec * 15);
setcvar('--tmtime', (sec - 0.15) + 's');
setcvar('--tmstep', Math.floor(sec * 20));
html += '<div id="toastt"></div>';
}
obj.innerHTML = html + '<a href="#" id="toastc">x</a><div id="toastb">' + lf2br(txt) + '</div>';