Skip to content

Commit

Permalink
proximity
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrouget committed May 29, 2012
1 parent 4893585 commit 7b3ae57
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions apis/index.html
Expand Up @@ -300,6 +300,22 @@
}, 60000);
</script>

<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- PROXIMITY -->
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->

<div class="wrapper">
<p id="proximity" style="font-size: 30px">Far…</p>
<script>
window.addEventListener("userproximity", function(a) {
var d = document.querySelector("#proximity");
if (a.near) d.innerHTML = "Near!"
else d.innerHTML = "Far…"
}, true);
</script>
</div>


<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- GPS -->
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
Expand Down

0 comments on commit 7b3ae57

Please sign in to comment.