Skip to content

Commit 7afb045

Browse files
committed
Condensed JS importing ↞ [auto-sync from https://github.com/KudoAI/chatgpt.js-chrome-starter]
1 parent c47994b commit 7afb045

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

starters/chrome/extension/popup/controller.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
(async () => {
22

33
// Import JS resources
4-
await import(chrome.runtime.getURL('components/icons.js'))
5-
await import(chrome.runtime.getURL('lib/dom.js'))
6-
await import(chrome.runtime.getURL('lib/settings.js'))
4+
for (const resource of ['components/icons.js', 'lib/dom.js', 'lib/settings.js'])
5+
await import(chrome.runtime.getURL(resource))
76

87
// Init ENV context
98
const env = { site: /([^.]+)\.[^.]+$/.exec(new URL((await chrome.tabs.query(

0 commit comments

Comments
 (0)