-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
30 lines (27 loc) · 947 Bytes
/
index.html
File metadata and controls
30 lines (27 loc) · 947 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="generator" content="HTML Tidy for Linux (vers 25 March 2009), see www.w3.org">
<script type="text/javascript">
function getToken() {
let re = /access_token=(.*)&/;
let response = document.getElementById('response').value;
let result = re.exec(response);
if (result === null) {
alert("Invalid token response");
} else {
document.getElementById('accessToken').value = result[1];
}
}
</script>
<title></title>
</head>
<body>
<h2>Token parser</h2>
<textarea id="response" rows="15" cols="120">
</textarea>
<p><input type="button" id="getTokenButton" onclick="getToken()" value="Parse"></p>
<label for="accesToken">Access token:</label>
<form><input type="text" id="accessToken"></form>
</body>
</html>