Skip to content

Commit f16ec5a

Browse files
committed
Destructured Chrome listener params ↞ [auto-sync from https://github.com/KudoAI/chatgpt.js-chrome-starter]
1 parent 2278c4f commit f16ec5a

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

starters/chrome/extension/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"name": "ChatGPT Extension",
44
"short_name": "ChatGPT 🧩",
55
"description": "A Chromium extension template to start using chatgpt.js like a boss!",
6-
"version": "2025.9.2.6",
6+
"version": "2025.9.3",
77
"author": "KudoAI",
88
"homepage_url": "https://github.com/KudoAI/chatgpt.js-chrome-starter",
99
"icons": { "16": "icons/icon16.png", "32": "icons/icon32.png", "64": "icons/icon64.png", "128": "icons/icon128.png" },

starters/chrome/extension/service-worker.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ chrome.storage.local.set({ app: {
1515
}}) // save to Chrome storage
1616

1717
// Launch CHATGPT on install
18-
chrome.runtime.onInstalled.addListener(details => {
19-
if (details.reason == 'install') // to exclude updates
18+
chrome.runtime.onInstalled.addListener(({ reason }) => {
19+
if (reason == 'install') // to exclude updates
2020
chrome.tabs.create({ url: chatgptURL })
2121
})
2222

2323
// Sync SETTINGS to activated tabs
24-
chrome.tabs.onActivated.addListener(activeInfo =>
25-
chrome.tabs.sendMessage(activeInfo.tabId, { action: 'syncConfigToUI' }))
24+
chrome.tabs.onActivated.addListener(({ tabId }) =>
25+
chrome.tabs.sendMessage(tabId, { action: 'syncConfigToUI' }))
2626

2727
// Show ABOUT modal on ChatGPT when toolbar button clicked
28-
chrome.runtime.onMessage.addListener(async req => {
29-
if (req.action == 'showAbout') {
28+
chrome.runtime.onMessage.addListener(async ({ action }) => {
29+
if (action == 'showAbout') {
3030
const [activeTab] = await chrome.tabs.query({ active: true, currentWindow: true })
3131
const chatgptTab = new URL(activeTab.url).hostname == 'chatgpt.com' ? activeTab
3232
: await chrome.tabs.create({ url: chatgptURL })

0 commit comments

Comments
 (0)