From 478e728c300339a63d86ae994bc8aef38fc53b63 Mon Sep 17 00:00:00 2001 From: Travis Fischer Date: Fri, 23 Dec 2022 01:01:07 -0600 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- legacy/src/openai-auth.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/legacy/src/openai-auth.ts b/legacy/src/openai-auth.ts index 485f8996..3d9e863f 100644 --- a/legacy/src/openai-auth.ts +++ b/legacy/src/openai-auth.ts @@ -420,15 +420,16 @@ export async function initializeNopechaExtension( await page3.goto(extensionUrl, { waitUntil: 'networkidle2' }) const editKey = await page3.waitForSelector('#edit_key .clickable') await editKey.click() + await delay(100) for (let i = 0; i <= 30; i++) { - await page3.keyboard.press('Backspace') + await editKey.press('Backspace') } - await page3.keyboard.type(nopechaKey) - await delay(1000) - await page3.keyboard.press('Enter') - await delay(1000) + await editKey.type(nopechaKey) + await delay(500) + await editKey.press('Enter') + await delay(2500) console.log('initialized nopecha extension with key', nopechaKey) } else { console.error(