Skip to content

Commit 2d53893

Browse files
committed
Removed unneeded config.prefix ↞ [auto-sync from KudoAI/chatgpt.js-chrome-starter]
1 parent d49dbd0 commit 2d53893

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

starters/chrome/extension/lib/settings.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const config = {
2-
prefix: 'chatgptJS', appSymbol: '🤖', appName: 'ChatGPT Extension',
2+
appSymbol: '🤖', appName: 'ChatGPT Extension',
33
ghRepoURL: 'https://github.kudoai.com/chatgpt.js-chrome-starter' }
44

55
const settings = {
@@ -9,12 +9,12 @@ const settings = {
99
Array.isArray(arguments[0]) ? arguments[0] : Array.from(arguments))
1010
return Promise.all(keys.map((key) => { // resolve promise when all keys load
1111
return new Promise((resolve) => { // resolve promise when single key value loads
12-
chrome.storage.local.get(config.prefix + '_' + key, (result) => { // load from Chrome
13-
config[key] = result[config.prefix + '_' + key] || false ; resolve()
12+
chrome.storage.local.get(key, (result) => { // load from Chrome
13+
config[key] = result[key] || false ; resolve()
1414
})})}))},
1515

1616
save: function(key, value) {
17-
const obj = {} ; obj[config.prefix + '_' + key] = value
17+
const obj = {} ; obj[key] = value
1818
chrome.storage.local.set(obj) // save to Chrome
1919
config[key] = value // save to memory
2020
}

0 commit comments

Comments
 (0)