()
| 1 | function iOS() { |
| 2 | return ( |
| 3 | [ |
| 4 | 'iPad Simulator', |
| 5 | 'iPhone Simulator', |
| 6 | 'iPod Simulator', |
| 7 | 'iPad', |
| 8 | 'iPhone', |
| 9 | 'iPod', |
| 10 | 'Android', |
| 11 | ].includes(navigator.platform) || |
| 12 | // iPad on iOS 13 detection |
| 13 | (navigator.userAgent.includes('Mac') && 'ontouchend' in document) |
| 14 | ); |
| 15 | } |
| 16 | |
| 17 | const isAndroid = navigator.userAgent.toLowerCase().indexOf('android'); |
| 18 |