From 7771d72619be4043c22ba06cee2c4b9e1e83b3b6 Mon Sep 17 00:00:00 2001 From: Joel2B Date: Sat, 2 Jul 2022 13:29:30 -0600 Subject: [PATCH] chore: set timeout to 0 --- src/extension/modules/subtitles.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/extension/modules/subtitles.js b/src/extension/modules/subtitles.js index d5b970a..7b2969f 100644 --- a/src/extension/modules/subtitles.js +++ b/src/extension/modules/subtitles.js @@ -309,7 +309,7 @@ export async function translateSubtitles() { const settingsButton = document.querySelector('.ytp-settings-button'); settingsButton.click(); - await delay(1000); + await delay(0); let subtitlesExist = false; const subtitulesMenu = document.querySelectorAll('.ytp-menuitem'); @@ -327,7 +327,7 @@ export async function translateSubtitles() { return; } - await delay(1000); + await delay(0); let translationsExist = false; @@ -370,7 +370,7 @@ export async function translateSubtitles() { subtituleItems[subtituleItems.length - 1].click(); } - await delay(1000); + await delay(0); let languageExist = false; const languages = document.querySelectorAll('.ytp-menuitem');