@@ -19,7 +19,7 @@ $('#hook_URL').attr(
19
19
`chrome-extension://${ chrome . runtime . id } /welcome.html` ,
20
20
) ;
21
21
22
- chrome . storage . sync . get ( 'leethub_token' , ( data ) => {
22
+ chrome . storage . local . get ( 'leethub_token' , ( data ) => {
23
23
const token = data . leethub_token ;
24
24
if ( token === null || token === undefined ) {
25
25
action = true ;
@@ -33,11 +33,11 @@ chrome.storage.sync.get('leethub_token', (data) => {
33
33
if ( xhr . readyState === 4 ) {
34
34
if ( xhr . status === 200 ) {
35
35
/* Show MAIN FEATURES */
36
- chrome . storage . sync . get ( 'mode_type' , ( data2 ) => {
36
+ chrome . storage . local . get ( 'mode_type' , ( data2 ) => {
37
37
if ( data2 && data2 . mode_type === 'commit' ) {
38
38
$ ( '#commit_mode' ) . show ( ) ;
39
39
/* Get problem stats and repo link */
40
- chrome . storage . sync . get (
40
+ chrome . storage . local . get (
41
41
[ 'stats' , 'leethub_hook' ] ,
42
42
( data3 ) => {
43
43
const { stats } = data3 ;
@@ -62,7 +62,7 @@ chrome.storage.sync.get('leethub_token', (data) => {
62
62
} else if ( xhr . status === 401 ) {
63
63
// bad oAuth
64
64
// reset token and redirect to authorization process again!
65
- chrome . storage . sync . set ( { leethub_token : null } , ( ) => {
65
+ chrome . storage . local . set ( { leethub_token : null } , ( ) => {
66
66
console . log (
67
67
'BAD oAuth!!! Redirecting back to oAuth process' ,
68
68
) ;
0 commit comments