Skip to content

Instantly share code, notes, and snippets.

@matijs
Last active December 11, 2015 00:08
Show Gist options
  • Save matijs/4514065 to your computer and use it in GitHub Desktop.
Save matijs/4514065 to your computer and use it in GitHub Desktop.
Bookmarklet to use the browser's geolocation
javascript:void (navigator.geolocation.getCurrentPosition(function(b){var a=document.forms[0],d=b.coords;a.q.value=d.latitude+","+d.longitude;a.submit()})());
javascript:void(navigator.geolocation.getCurrentPosition(function(p){
var f=document.forms[0],
c=p.coords;
f.q.value=c.latitude+','+c.longitude;
f.submit()
})())
@matijs
Copy link
Author

matijs commented Jan 22, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment