summaryrefslogtreecommitdiff
path: root/StoneIsland/www/js/lib/etc
diff options
context:
space:
mode:
authorRene Ae <aehtyb@gmail.com>2015-12-01 00:51:02 -0600
committerRene Ae <aehtyb@gmail.com>2015-12-01 00:51:02 -0600
commit6415f506034262dd7151be2e35e1e1c1e97f4dfa (patch)
treec6e564e374967725a40fd87f7c5f3a1ba8019089 /StoneIsland/www/js/lib/etc
parent5e07e273e18a609978253c45f3c5f702b0de4991 (diff)
parent9497b50fa02f3cfa9cb263ce3a96fa725282d60d (diff)
Merge branch 'master' of https://github.com/okfocus/stone-island
Diffstat (limited to 'StoneIsland/www/js/lib/etc')
-rw-r--r--StoneIsland/www/js/lib/etc/deeplink.js3
-rw-r--r--StoneIsland/www/js/lib/etc/geo.js33
-rw-r--r--StoneIsland/www/js/lib/etc/push.js1
3 files changed, 37 insertions, 0 deletions
diff --git a/StoneIsland/www/js/lib/etc/deeplink.js b/StoneIsland/www/js/lib/etc/deeplink.js
new file mode 100644
index 00000000..648dd167
--- /dev/null
+++ b/StoneIsland/www/js/lib/etc/deeplink.js
@@ -0,0 +1,3 @@
+function handleOpenURL (url) {
+ app.router.initial_route = url
+} \ No newline at end of file
diff --git a/StoneIsland/www/js/lib/etc/geo.js b/StoneIsland/www/js/lib/etc/geo.js
new file mode 100644
index 00000000..0270d681
--- /dev/null
+++ b/StoneIsland/www/js/lib/etc/geo.js
@@ -0,0 +1,33 @@
+var geo = (function(){
+ var geo = {}
+
+ geo.fetch = function(){
+ navigator.geolocation.getCurrentPosition(geo.success, geo.error, {timeout: 15000})
+ }
+
+ geo.success = function(position){
+ var lat_str = as_degrees( position.coords.latitude )
+ var lng_str = as_degrees( position.coords.longitude )
+ }
+
+ geo.error = function(error){
+ $(".latlng").html( "+40&deg; 58' 90\" -74&deg; 04' 46\"" )
+ }
+
+ function as_degrees (n) {
+ var s = ""
+ if (n >= 0) s += "+"
+ s += Math.floor(n) + "&deg; "
+
+ n %= 1
+ n *= 60
+ s += Math.floor(n) + "'"
+
+ n %= 1
+ n *= 60
+
+ s += Math.floor(n) + '"'
+ }
+
+ return geo
+})() \ No newline at end of file
diff --git a/StoneIsland/www/js/lib/etc/push.js b/StoneIsland/www/js/lib/etc/push.js
new file mode 100644
index 00000000..ab0c0141
--- /dev/null
+++ b/StoneIsland/www/js/lib/etc/push.js
@@ -0,0 +1 @@
+// \ No newline at end of file