Skip to content

Instantly share code, notes, and snippets.

View asmblah's full-sized avatar

Dan Phillimore asmblah

  • Leicester, UK
View GitHub Profile
@asmblah
asmblah / gist:8349213
Last active January 2, 2016 19:19
Fixes iOS7.0.4's standalone webapp bug
(function fixIOS7HistoryState(global) {
// Ensure we are running as a standalone webapp, in a version supporting the History.state property
if (navigator.standalone && typeof browserHistory.state !== "undefined") {
var browserLocation = global.location,
fakeState = {},
key = Math.random(),
location = browserLocation.href,
oldState = browserHistory.state,
title = global.document.title;