Files
pjax/lib/is-supported.js
BehindTheMath 3c1a4b2e18 Switch linting to ESLint and Prettier (#191)
* Switch linting to ESLint and Prettier
* Clean up config
* Prettier fixes
2019-02-13 22:26:57 -05:00

13 lines
360 B
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
module.exports = function() {
// Borrowed wholesale from https://github.com/defunkt/jquery-pjax
return (
window.history &&
window.history.pushState &&
window.history.replaceState &&
// pushState isnt reliable on iOS until 5.
!navigator.userAgent.match(
/((iPod|iPhone|iPad).+\bOS\s+[1-4]\D|WebApps\/.+CFNetwork)/
)
);
};