From 73aa9208fd81a94ab1cb06e8da3b2c9ba88c149e Mon Sep 17 00:00:00 2001 From: hanyd Date: Fri, 6 Sep 2024 11:41:23 +0800 Subject: [PATCH] More robust waiting until all buttons are rendered --- src/render/PlayerButton.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/render/PlayerButton.tsx b/src/render/PlayerButton.tsx index 6b4a53b6..69caff47 100644 --- a/src/render/PlayerButton.tsx +++ b/src/render/PlayerButton.tsx @@ -82,6 +82,7 @@ export class PlayerButton { controlsContainer.prepend(this.container); // wait a tick for React to render the buttons + await waitFor(() => document.getElementById("startSegmentButton"), 5000, 10); await waitFor(() => document.getElementById("infoButton"), 5000, 10); this.playerButtons = { startSegment: {