Skip to content

Instantly share code, notes, and snippets.

@tmcw
Created February 27, 2013 04:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmcw/5045130 to your computer and use it in GitHub Desktop.
Save tmcw/5045130 to your computer and use it in GitHub Desktop.
function locationLoaded(loc) {
// do logic post-location load here
}
if (localStorage.loc) {
locationLoaded(loc);
} else {
navigator.geolocate(locationLoaded);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment