mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-18 00:25:07 +00:00
Fix navigation on chrome for iOS: disable pushState
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user