Skip to content

Commit

Permalink
fix: minor improvement to nopecha init
Browse files Browse the repository at this point in the history
  • Loading branch information
transitive-bullshit committed Dec 27, 2022
1 parent 4e9ce99 commit 69f955d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/openai-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,9 @@ export async function initializeNopechaExtension(
await minimizePage(page)
}

await page.goto(`https://nopecha.com/setup#${nopechaKey}`)
await page.goto(`https://nopecha.com/setup#${nopechaKey}`, {
waitUntil: 'networkidle0'
})
await delay(1000)
try {
// find the nopecha extension ID
Expand All @@ -411,7 +413,7 @@ export async function initializeNopechaExtension(

if (extensionId) {
const extensionUrl = `chrome-extension://${extensionId}/popup.html`
await page.goto(extensionUrl, { waitUntil: 'networkidle2' })
await page.goto(extensionUrl, { waitUntil: 'networkidle0' })
const editKey = await page.waitForSelector('#edit_key .clickable')
await editKey.click()

Expand Down

0 comments on commit 69f955d

Please sign in to comment.