@@ -3,6 +3,7 @@ const steemit = (window.location.href.includes('steemit.com') || window.location
3
3
const busy = window . location . href . includes ( 'busy.org' ) ;
4
4
const utopian = window . location . href . includes ( 'utopian.io' ) ;
5
5
const steemMonsters = window . location . href . includes ( 'steemmonsters.com' ) ;
6
+ const steemitwallet = window . location . href . includes ( 'steemitwallet.com' ) ;
6
7
console . log ( 'Starting SteemPlus...' ) ;
7
8
var market = null ;
8
9
var SBDperSteem = 0 ;
@@ -18,11 +19,11 @@ var offlineModeRetryCount = 0;
18
19
let hasSKC = false ;
19
20
20
21
let elementUsername = null ;
21
- if ( steemit ) elementUsername = '.Header__userpic > span' ;
22
+ if ( steemit || steemitwallet ) elementUsername = '.Header__userpic > span' ;
22
23
else if ( busy ) elementUsername = '.Topnav__user' ;
23
24
24
25
if ( $ ( elementUsername ) . length > 0 ) {
25
- if ( steemit ) user = $ ( elementUsername ) [ 0 ] . title ; //Get username in offline mode
26
+ if ( steemit || steemitwallet ) user = $ ( elementUsername ) [ 0 ] . title ; //Get username in offline mode
26
27
else if ( busy ) user = $ ( elementUsername ) [ 0 ] . href . replace ( 'https://busy.org/@' , '' ) ; //Get username in offline mode
27
28
}
28
29
steem_keychain . requestHandshake ( function ( ) {
@@ -98,13 +99,13 @@ Promise.all([steem.api.getDynamicGlobalPropertiesAsync(), steem.api.getCurrentMe
98
99
to : 'sm_batch' ,
99
100
order : 'start'
100
101
} ) ;
101
- if ( delegation && ( steemit || busy ) )
102
+ if ( delegation && ( steemit || steemitwallet || busy ) )
102
103
chrome . runtime . sendMessage ( {
103
104
token : token ,
104
105
to : 'delegation' ,
105
106
order : 'notif' ,
106
107
data : {
107
- steemit : steemit ,
108
+ steemit : steemit || steemitwallet ,
108
109
busy : busy ,
109
110
global : {
110
111
totalSteem : totalSteem ,
@@ -176,7 +177,7 @@ Promise.all([steem.api.getDynamicGlobalPropertiesAsync(), steem.api.getCurrentMe
176
177
totalVestingShares : totalVests
177
178
}
178
179
} ) ;
179
- if ( steemit && user_info_popover )
180
+ if ( ( steemit || steemitwallet ) && user_info_popover )
180
181
chrome . runtime . sendMessage ( {
181
182
token : token ,
182
183
to : 'user_info_popover' ,
@@ -561,11 +562,11 @@ function initOfflineFeatures(isConnected, items, user, account) {
561
562
if ( offlineModeRetryCount < 30 ) {
562
563
if ( ! isConnected ) {
563
564
var elementUsername = null ;
564
- if ( steemit ) elementUsername = '.Header__userpic > span' ;
565
+ if ( steemit || steemitwallet ) elementUsername = '.Header__userpic > span' ;
565
566
else if ( busy ) elementUsername = '.Topnav__user' ;
566
567
567
568
if ( $ ( elementUsername ) . length > 0 ) {
568
- if ( steemit ) user = $ ( elementUsername ) [ 0 ] . title ; //Get username in offline mode
569
+ if ( steemit || steemitwallet ) user = $ ( elementUsername ) [ 0 ] . title ; //Get username in offline mode
569
570
else if ( busy ) user = $ ( elementUsername ) [ 0 ] . href . replace ( 'https://busy.org/@' , '' ) ; //Get username in offline mode
570
571
steem . api . getAccounts ( [ user ] , function ( err , result ) {
571
572
if ( err ) console . log ( err ) ;
@@ -643,13 +644,13 @@ async function startOfflineFeatures(items, user, account) {
643
644
checkLastPost ( last_post_url , account ) ;
644
645
645
646
console . log ( 'Starting features...' , user ) ;
646
- if ( delegation && ( steemit || busy ) )
647
+ if ( delegation && ( steemit || steemitwallet || busy ) )
647
648
chrome . runtime . sendMessage ( {
648
649
token : token ,
649
650
to : 'delegation' ,
650
651
order : 'start' ,
651
652
data : {
652
- steemit : steemit ,
653
+ steemit : steemit || steemitwallet ,
653
654
busy : busy ,
654
655
global : {
655
656
totalSteem : totalSteemLS ,
@@ -658,13 +659,13 @@ async function startOfflineFeatures(items, user, account) {
658
659
account : account
659
660
}
660
661
} ) ;
661
- if ( transfers && ( steemit ) )
662
+ if ( transfers && ( steemit || steemitwallet ) )
662
663
chrome . runtime . sendMessage ( {
663
664
token : token ,
664
665
to : 'transfers' ,
665
666
order : 'start' ,
666
667
data : {
667
- steemit : steemit ,
668
+ steemit : steemit || steemitwallet ,
668
669
busy : busy ,
669
670
user : user ,
670
671
balance : {
@@ -673,14 +674,14 @@ async function startOfflineFeatures(items, user, account) {
673
674
}
674
675
}
675
676
} ) ;
676
- if ( account_value && ( steemit || busy ) )
677
+ if ( account_value && ( steemit || steemitwallet || busy ) )
677
678
chrome . runtime . sendMessage ( {
678
679
token : token ,
679
680
to : 'acc_v' ,
680
681
order : 'start' ,
681
682
data : {
682
683
user : user ,
683
- steemit : steemit ,
684
+ steemit : steemit || steemitwallet ,
684
685
busy : busy ,
685
686
global : {
686
687
totalSteem : totalSteemLS ,
@@ -689,14 +690,14 @@ async function startOfflineFeatures(items, user, account) {
689
690
market : market
690
691
}
691
692
} ) ;
692
- if ( rank && ( steemit || busy ) )
693
+ if ( rank && ( steemit || steemitwallet || busy ) )
693
694
chrome . runtime . sendMessage ( {
694
695
badge : items . badge ,
695
696
token : token ,
696
697
to : 'rank' ,
697
698
order : 'start' ,
698
699
data : {
699
- steemit : steemit ,
700
+ steemit : steemit || steemitwallet ,
700
701
busy : busy ,
701
702
totalSteem : totalSteemLS ,
702
703
totalVests : totalVestsLS
@@ -745,17 +746,17 @@ async function startOfflineFeatures(items, user, account) {
745
746
busy : busy
746
747
}
747
748
} ) ;
748
- if ( article_count && ( steemit || busy ) )
749
+ if ( article_count && ( steemit || steemitwallet || busy ) )
749
750
chrome . runtime . sendMessage ( {
750
751
token : token ,
751
752
to : 'article_count' ,
752
753
order : 'start' ,
753
754
data : {
754
- steemit : steemit ,
755
+ steemit : steemit || steemitwallet ,
755
756
busy : busy
756
757
}
757
758
} ) ;
758
- if ( wallet_history && steemit )
759
+ if ( wallet_history && ( steemit || steemitwallet ) )
759
760
chrome . runtime . sendMessage ( {
760
761
token : token ,
761
762
to : 'wallet_history' ,
@@ -824,14 +825,14 @@ async function startOfflineFeatures(items, user, account) {
824
825
busy : busy
825
826
}
826
827
} ) ;
827
- if ( steemplus_points && ( steemit || busy ) )
828
+ if ( steemplus_points && ( steemit || steemitwallet || busy ) )
828
829
chrome . runtime . sendMessage ( {
829
830
token : token ,
830
831
to : 'steemplus_points' ,
831
832
order : 'start' ,
832
833
data : {
833
834
account : account ,
834
- steemit : steemit ,
835
+ steemit : steemit || steemitwallet ,
835
836
busy : busy ,
836
837
market : market ,
837
838
global : {
@@ -851,7 +852,7 @@ async function startOfflineFeatures(items, user, account) {
851
852
busy : busy
852
853
}
853
854
} ) ;
854
- if ( premium_features && steemit )
855
+ if ( premium_features && steemit || steemitwallet )
855
856
chrome . runtime . sendMessage ( {
856
857
token : token ,
857
858
order : 'start' ,
@@ -951,7 +952,7 @@ async function startOfflineFeatures(items, user, account) {
951
952
order : 'start' ,
952
953
data : { }
953
954
} ) ;
954
- if ( steemit && user_info_popover )
955
+ if ( steemit || steemitwallet && user_info_popover )
955
956
chrome . runtime . sendMessage ( {
956
957
token : token ,
957
958
to : 'user_info_popover' ,
@@ -1001,13 +1002,13 @@ async function startOfflineFeatures(items, user, account) {
1001
1002
if ( urlOffline !== window . location . href ) {
1002
1003
if ( urlOffline . match ( / t r a n s f e r s / ) && window . location . href . includes ( '@' + user + '/transfers' ) )
1003
1004
location . reload ( ) ;
1004
- if ( delegation && ( steemit || busy ) )
1005
+ if ( delegation && ( steemit || steemitwallet || busy ) )
1005
1006
chrome . runtime . sendMessage ( {
1006
1007
token : token ,
1007
1008
to : 'delegation' ,
1008
1009
order : 'click' ,
1009
1010
data : {
1010
- steemit : steemit ,
1011
+ steemit : steemit || steemitwallet ,
1011
1012
busy : busy ,
1012
1013
global : {
1013
1014
totalSteem : totalSteemLS ,
@@ -1016,28 +1017,28 @@ async function startOfflineFeatures(items, user, account) {
1016
1017
account : account
1017
1018
}
1018
1019
} ) ;
1019
- if ( transfers && ( steemit ) )
1020
+ if ( transfers && ( steemit || steemitwallet ) )
1020
1021
chrome . runtime . sendMessage ( {
1021
1022
token : token ,
1022
1023
to : 'transfers' ,
1023
1024
order : 'click' ,
1024
1025
data : {
1025
- steemit : steemit ,
1026
+ steemit : steemit || steemitwallet ,
1026
1027
user : user ,
1027
1028
balance : {
1028
1029
steem : account . balance . split ( ' ' ) [ 0 ] ,
1029
1030
sbd : account . sbd_balance . split ( ' ' ) [ 0 ]
1030
1031
}
1031
1032
}
1032
1033
} ) ;
1033
- if ( account_value && ( steemit || busy ) )
1034
+ if ( account_value && ( steemit || steemitwallet || busy ) )
1034
1035
chrome . runtime . sendMessage ( {
1035
1036
token : token ,
1036
1037
to : 'acc_v' ,
1037
1038
order : 'click' ,
1038
1039
data : {
1039
1040
user : user ,
1040
- steemit : steemit ,
1041
+ steemit : steemit || steemitwallet ,
1041
1042
busy : busy ,
1042
1043
global : {
1043
1044
totalSteem : totalSteemLS ,
@@ -1046,14 +1047,14 @@ async function startOfflineFeatures(items, user, account) {
1046
1047
market : market
1047
1048
}
1048
1049
} ) ;
1049
- if ( rank && ( steemit || busy ) )
1050
+ if ( rank && ( steemit || steemitwallet || busy ) )
1050
1051
chrome . runtime . sendMessage ( {
1051
1052
badge : items . badge ,
1052
1053
token : token ,
1053
1054
to : 'rank' ,
1054
1055
order : 'click' ,
1055
1056
data : {
1056
- steemit : steemit ,
1057
+ steemit : steemit || steemitwallet ,
1057
1058
busy : busy ,
1058
1059
totalSteem : totalSteemLS ,
1059
1060
totalVests : totalVestsLS
@@ -1084,7 +1085,7 @@ async function startOfflineFeatures(items, user, account) {
1084
1085
order : 'click' ,
1085
1086
data : { }
1086
1087
} ) ;
1087
- if ( steemit && user_info_popover && steemit_more_info )
1088
+ if ( steemit || steemitwallet && user_info_popover && steemit_more_info )
1088
1089
chrome . runtime . sendMessage ( {
1089
1090
token : token ,
1090
1091
to : 'user_info_popover' ,
@@ -1196,17 +1197,17 @@ async function startOfflineFeatures(items, user, account) {
1196
1197
busy : busy
1197
1198
}
1198
1199
} ) ;
1199
- if ( article_count && ( steemit || busy ) )
1200
+ if ( article_count && ( steemit || steemitwallet || busy ) )
1200
1201
chrome . runtime . sendMessage ( {
1201
1202
token : token ,
1202
1203
to : 'article_count' ,
1203
1204
order : 'click' ,
1204
1205
data : {
1205
- steemit : steemit ,
1206
+ steemit : steemit || steemitwallet ,
1206
1207
busy : busy
1207
1208
}
1208
1209
} ) ;
1209
- if ( wallet_history && steemit )
1210
+ if ( wallet_history && ( steemit || steemitwallet ) )
1210
1211
chrome . runtime . sendMessage ( {
1211
1212
token : token ,
1212
1213
to : 'wallet_history' ,
@@ -1302,14 +1303,14 @@ async function startOfflineFeatures(items, user, account) {
1302
1303
steemPrice : steemPriceLS
1303
1304
}
1304
1305
} ) ;
1305
- if ( steemplus_points && ( steemit || busy ) )
1306
+ if ( steemplus_points && ( steemit || steemitwallet || busy ) )
1306
1307
chrome . runtime . sendMessage ( {
1307
1308
token : token ,
1308
1309
to : 'steemplus_points' ,
1309
1310
order : 'click' ,
1310
1311
data : {
1311
1312
account : account ,
1312
- steemit : steemit ,
1313
+ steemit : steemit || steemitwallet ,
1313
1314
busy : busy ,
1314
1315
market : market ,
1315
1316
global : {
@@ -1331,7 +1332,7 @@ async function startOfflineFeatures(items, user, account) {
1331
1332
}
1332
1333
} ) ;
1333
1334
1334
- if ( premium_features && steemit )
1335
+ if ( premium_features && steemit || steemitwallet )
1335
1336
chrome . runtime . sendMessage ( {
1336
1337
token : token ,
1337
1338
order : 'click' ,
@@ -1349,7 +1350,7 @@ async function startOfflineFeatures(items, user, account) {
1349
1350
1350
1351
urlOffline = window . location . href ;
1351
1352
}
1352
- if ( dropdown && steemit )
1353
+ if ( dropdown && steemit || steemitwallet )
1353
1354
chrome . runtime . sendMessage ( {
1354
1355
token : token ,
1355
1356
to : 'drop' ,
0 commit comments