File tree Expand file tree Collapse file tree 2 files changed +52
-2
lines changed Expand file tree Collapse file tree 2 files changed +52
-2
lines changed Original file line number Diff line number Diff line change @@ -6505,11 +6505,36 @@ const EasyCoder_Browser = {
6505
6505
content : typeof symbolRecord . element [ symbolRecord . index ] !== `undefined`
6506
6506
} ;
6507
6507
case `mobile` :
6508
+ const isMobile = {
6509
+ Android : function ( ) {
6510
+ return navigator . userAgent . match ( / A n d r o i d / i) ;
6511
+ } ,
6512
+ BlackBerry : function ( ) {
6513
+ return navigator . userAgent . match ( / B l a c k B e r r y / i) ;
6514
+ } ,
6515
+ Chrome : function ( ) {
6516
+ return navigator . userAgent . match ( / c h r o m e | c h r o m i u m | c r i o s / i) ;
6517
+ } ,
6518
+ iOS : function ( ) {
6519
+ return navigator . userAgent . match ( / i P h o n e | i P a d | i P o d / i) ;
6520
+ } ,
6521
+ Opera : function ( ) {
6522
+ return navigator . userAgent . match ( / O p e r a M i n i / i) ;
6523
+ } ,
6524
+ Windows : function ( ) {
6525
+ return navigator . userAgent . match ( / I E M o b i l e / i) || navigator . userAgent . match ( / W P D e s k t o p / i) ;
6526
+ } ,
6527
+ any : function ( ) {
6528
+ return ( isMobile . Android ( ) || isMobile . BlackBerry ( ) || isMobile . Chrome ( )
6529
+ || isMobile . iOS ( ) || isMobile . Opera ( ) || isMobile . Windows ( ) ) ;
6530
+ }
6531
+ } ;
6508
6532
return {
6509
6533
domain : `browser` ,
6510
6534
type : `boolean` ,
6535
+ content : isMobile . any ( )
6511
6536
// content: (typeof window.orientation !== `undefined`) || (navigator.userAgent.indexOf(`IEMobile`) !== -1)
6512
- content : ( / A n d r o i d | i P h o n e / i. test ( navigator . userAgent ) )
6537
+ // content: (/Android|iPhone/i.test(navigator.userAgent))
6513
6538
} ;
6514
6539
case `browserName` :
6515
6540
let userAgent = navigator . userAgent ;
Original file line number Diff line number Diff line change @@ -3125,11 +3125,36 @@ const EasyCoder_Browser = {
3125
3125
content : typeof symbolRecord . element [ symbolRecord . index ] !== `undefined`
3126
3126
} ;
3127
3127
case `mobile` :
3128
+ const isMobile = {
3129
+ Android : function ( ) {
3130
+ return navigator . userAgent . match ( / A n d r o i d / i) ;
3131
+ } ,
3132
+ BlackBerry : function ( ) {
3133
+ return navigator . userAgent . match ( / B l a c k B e r r y / i) ;
3134
+ } ,
3135
+ Chrome : function ( ) {
3136
+ return navigator . userAgent . match ( / c h r o m e | c h r o m i u m | c r i o s / i) ;
3137
+ } ,
3138
+ iOS : function ( ) {
3139
+ return navigator . userAgent . match ( / i P h o n e | i P a d | i P o d / i) ;
3140
+ } ,
3141
+ Opera : function ( ) {
3142
+ return navigator . userAgent . match ( / O p e r a M i n i / i) ;
3143
+ } ,
3144
+ Windows : function ( ) {
3145
+ return navigator . userAgent . match ( / I E M o b i l e / i) || navigator . userAgent . match ( / W P D e s k t o p / i) ;
3146
+ } ,
3147
+ any : function ( ) {
3148
+ return ( isMobile . Android ( ) || isMobile . BlackBerry ( ) || isMobile . Chrome ( )
3149
+ || isMobile . iOS ( ) || isMobile . Opera ( ) || isMobile . Windows ( ) ) ;
3150
+ }
3151
+ } ;
3128
3152
return {
3129
3153
domain : `browser` ,
3130
3154
type : `boolean` ,
3155
+ content : isMobile . any ( )
3131
3156
// content: (typeof window.orientation !== `undefined`) || (navigator.userAgent.indexOf(`IEMobile`) !== -1)
3132
- content : ( / A n d r o i d | i P h o n e / i. test ( navigator . userAgent ) )
3157
+ // content: (/Android|iPhone/i.test(navigator.userAgent))
3133
3158
} ;
3134
3159
case `browserName` :
3135
3160
let userAgent = navigator . userAgent ;
You can’t perform that action at this time.
0 commit comments