File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
starters/chrome/extension/lib Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 11const config = {
2- prefix : 'chatgptJS' , appSymbol : '🤖' , appName : 'ChatGPT Extension' ,
2+ appSymbol : '🤖' , appName : 'ChatGPT Extension' ,
33 ghRepoURL : 'https://github.kudoai.com/chatgpt.js-chrome-starter' }
44
55const 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 }
You can’t perform that action at this time.
0 commit comments