Skip to content

Commit 83636e1

Browse files
committed
Condensed About button msg listener ↞ [auto-sync from https://github.com/KudoAI/chatgpt.js-chrome-starter]
1 parent 2418f3d commit 83636e1

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

starters/chrome/extension/service-worker.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ chrome.runtime.onMessage.addListener(async req => {
3131
chrome.tabs.onUpdated.addListener(async function statusListener(tabId, info) {
3232
if (tabId == chatgptTab.id && info.status == 'complete') {
3333
chrome.tabs.onUpdated.removeListener(statusListener)
34-
await new Promise(resolve => setTimeout(resolve, 2500))
35-
resolve()
34+
setTimeout(resolve, 2500)
3635
}}))
3736
chrome.tabs.sendMessage(chatgptTab.id, { action: 'showAbout' })
3837
}

0 commit comments

Comments
 (0)