1<!DOCTYPE html>
2<html>
3	<head>
4		<title></title>
5	</head>
6	<body>
7		This window will be closed automatically.
8		<script>
9			if (window.opener != null && window.opener.onGitHubCallback != null)
10			{
11				try
12				{
13					var search = window.location.search;
14					var idx1 = search.indexOf('code=');
15					var code = null;
16
17					if (idx1 >= 0)
18					{
19						code = search.substring(idx1 + 5);
20					}
21
22					// Continues execution of main program flow
23					window.opener.onGitHubCallback(code, window);
24				}
25				catch (e)
26				{
27					alert('GitHub: ' + e.toString());
28					window.close();
29				}
30			}
31		</script>
32	</body>
33</html>
34