Fix navigation on chrome for iOS: disable pushState

This commit is contained in:
Samy Pessé
2014-04-18 13:09:14 +02:00
parent 4e8876c725
commit e45bb84b02
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -10,12 +10,14 @@ define([
var prev, next;
var githubCountStars, githubCountWatch;
var usePushState = !navigator.userAgent.match('CriOS') && (typeof history.pushState !== "undefined");
var updateHistory = function(url, title) {
history.pushState({ path: url }, title, url);
};
var handleNavigation = function(url, push) {
if (typeof history.pushState === "undefined") {
if (!usePushState) {
// Refresh the page to the new URL if pushState not supported
location.href = url;
return