mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
perf: only apply message animations on first 35 elements
This commit is contained in:
+2
-1
@@ -641,8 +641,9 @@ async function handleMessages(node: Element): Promise<void> {
|
|||||||
if (!settingsState.animations) return;
|
if (!settingsState.animations) return;
|
||||||
|
|
||||||
await waitForElm('[data-message]');
|
await waitForElm('[data-message]');
|
||||||
|
const messages = Array.from(document.querySelectorAll('[data-message]')).slice(0, 35);
|
||||||
animate(
|
animate(
|
||||||
'[data-message]',
|
messages,
|
||||||
{ opacity: [0, 1], y: [10, 0] },
|
{ opacity: [0, 1], y: [10, 0] },
|
||||||
{
|
{
|
||||||
delay: stagger(0.05),
|
delay: stagger(0.05),
|
||||||
|
|||||||
Reference in New Issue
Block a user