Last active
August 29, 2015 13:55
-
-
Save paulofierro/8733957 to your computer and use it in GitHub Desktop.
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
<html> | |
<head> | |
<title>Token viewer</title> | |
<style> | |
body { | |
text-align:center; | |
font-family:'Helvetica Neue'; | |
} | |
</style> | |
</head> | |
<body> | |
<h1>Your device token is:</h1> | |
<h1 id="token"></h1> | |
<h2><a id="email">Tap to email it</a></h2> | |
<script> | |
var url = document.URL; | |
var param = '&token='; | |
var index = url.indexOf(param); | |
var token = url.substring(index + param.length, url.length); | |
var h1 = document.getElementById('token'); | |
h1.textContent = token; | |
var link = document.getElementById('email'); | |
link.setAttribute('href', 'mailto:?subject=Device Token&body=Your device token is ' + token); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment