* Detect HistoryAPI support while taking into account false positives. * Based on https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js
()
| 484 | * Based on https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js |
| 485 | */ |
| 486 | function isSupportHistoryAPIDetect(){ |
| 487 | var ua = global.navigator.userAgent; |
| 488 | // We only want Android 2 and 4.0, stock browser, and not Chrome which identifies |
| 489 | // itself as 'Mobile Safari' as well, nor Windows Phone (issue #1471). |
| 490 | if ((ua.indexOf('Android 2.') !== -1 || |
| 491 | (ua.indexOf('Android 4.0') !== -1)) && |
| 492 | ua.indexOf('Mobile Safari') !== -1 && |
| 493 | ua.indexOf('Chrome') === -1 && |
| 494 | ua.indexOf('Windows Phone') === -1) |
| 495 | { |
| 496 | return false; |
| 497 | } |
| 498 | // Return the regular check |
| 499 | return !!historyPushState; |
| 500 | } |
| 501 | |
| 502 | /** |
| 503 | * This method attempts to bind a function to global. |