Skip to content

Commit

Permalink
Condensed About button msg listener ↞ [auto-sync from https://github.…
Browse files Browse the repository at this point in the history
  • Loading branch information
kudo-sync-bot committed Dec 4, 2024
1 parent 9b7ac1f commit ed4e6b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions chromium/extension/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ chrome.runtime.onMessage.addListener(async req => {
chrome.tabs.onUpdated.addListener(async function statusListener(tabId, info) {
if (tabId == chatgptTab.id && info.status == 'complete') {
chrome.tabs.onUpdated.removeListener(statusListener)
await new Promise(resolve => setTimeout(resolve, 2500))
resolve()
setTimeout(resolve, 2500)
}}))
chrome.tabs.sendMessage(chatgptTab.id, { action: 'showAbout' })
}
Expand Down
3 changes: 1 addition & 2 deletions firefox/extension/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ chrome.runtime.onMessage.addListener(async req => {
chrome.tabs.onUpdated.addListener(async function statusListener(tabId, info) {
if (tabId == chatgptTab.id && info.status == 'complete') {
chrome.tabs.onUpdated.removeListener(statusListener)
await new Promise(resolve => setTimeout(resolve, 2500))
resolve()
setTimeout(resolve, 2500)
}}))
chrome.tabs.sendMessage(chatgptTab.id, { action: 'showAbout' })
}
Expand Down

0 comments on commit ed4e6b1

Please sign in to comment.