Skip to content

Commit 147e830

Browse files
committed
Added options param to syncConfigToUI() ↞ [auto-sync from https://github.com/KudoAI/chatgpt.js-chrome-starter]
1 parent e2c5e81 commit 147e830

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

starters/chrome/extension/content.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,15 @@
5050

5151
// Define SYNC function
5252

53-
async function syncConfigToUI() { // on toolbar popup toggles + ChatGPT tab activations
53+
async function syncConfigToUI(options) { // eslint-disable-line
5454
await settings.load('extensionDisabled', Object.keys(settings.controls)) // load from Chrome storage to content.js config
5555
if (config.extensionDisabled) {
5656
// Remove all hacks
5757
} else {
5858
// Add/remove hacks to reflect each potentially updated setting per settings.controls in lib/settings.mjs
5959
// e.g. if you created toolbar popup toggle to hide ChatGPT footer using hiddenFooter key...
60-
// ...here you would use config.hiddenFooter to conditionally append/remove hidden footer style...
60+
// ...here you would use options?.updatedKey == 'hiddenFooter' && config.hiddenFooter...
61+
// ...to conditionally append/remove hidden footer style...
6162
// ...(initial style creation + append if config.hiddenFooter would go in main routine)
6263
}
6364
}

0 commit comments

Comments
 (0)