proxy-based Twister client written with react-js
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
'use strict';
|
|
|
|
|
|
|
|
function supportsHistory() {
|
|
|
|
/*! taken from modernizr
|
|
|
|
* https://github.com/Modernizr/Modernizr/blob/master/LICENSE
|
|
|
|
* https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js
|
|
|
|
* changed to avoid false negatives for Windows Phones: https://github.com/rackt/react-router/issues/586
|
|
|
|
*/
|
|
|
|
var ua = navigator.userAgent;
|
|
|
|
if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
return window.history && 'pushState' in window.history;
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = supportsHistory;
|