File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change 66 function detect ( ua ) {
77 var os = this . os = { } , browser = this . browser = { } ,
88 webkit = ua . match ( / W e b K i t \/ ( [ \d . ] + ) / ) ,
9- android = ua . match ( / ( A n d r o i d ) \s + ( [ \d . ] + ) / ) ,
9+ android = ua . match ( / ( A n d r o i d ) ; ? \s + ( [ \d . ] + ) ? / ) ,
1010 ipad = ua . match ( / ( i P a d ) .* O S \s ( [ \d _ ] + ) / ) ,
1111 ipod = ua . match ( / ( i P o d ) ( .* O S \s ( [ \d _ ] + ) ) ? / ) ,
1212 iphone = ! ipad && ua . match ( / ( i P h o n e \s O S ) \s ( [ \d _ ] + ) / ) ,
Original file line number Diff line number Diff line change @@ -337,13 +337,15 @@ <h1>Browser detection</h1>
337337 detect ( UA . Firefox_13_Tablet , function ( os , browser ) {
338338 t . assertTrue ( browser . firefox )
339339 t . assertFalse ( browser . webkit )
340+ t . assertTrue ( os . android )
340341 t . assertFalse ( os . phone )
341342 t . assertTrue ( os . tablet )
342343 } )
343344
344345 detect ( UA . Firefox_13_Phone , function ( os , browser ) {
345346 t . assertTrue ( browser . firefox )
346347 t . assertFalse ( browser . webkit )
348+ t . assertTrue ( os . android )
347349 t . assertTrue ( os . phone )
348350 t . assertFalse ( os . tablet )
349351 } )
You can’t perform that action at this time.
0 commit comments