Last active
December 11, 2015 00:08
-
-
Save matijs/4514065 to your computer and use it in GitHub Desktop.
Bookmarklet to use the browser's geolocation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:void (navigator.geolocation.getCurrentPosition(function(b){var a=document.forms[0],d=b.coords;a.q.value=d.latitude+","+d.longitude;a.submit()})()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:void(navigator.geolocation.getCurrentPosition(function(p){ | |
var f=document.forms[0], | |
c=p.coords; | |
f.q.value=c.latitude+','+c.longitude; | |
f.submit() | |
})()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
via http://twitter.com/stoyanstefanov/status/289842772335284224