Gitako/lib/is-supported.js
EnixCoda 18ce99c8f6 Squashed 'packages/pjax/' content from commit 8abb21e
git-subtree-dir: packages/pjax
git-subtree-split: 8abb21e1e9d899217b03c489c9b2d9ecd92074b5
2018-06-05 23:48:45 +08:00

8 lines
336 B
JavaScript
Raw 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)/)
}