- Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathgithub.html
More file actions
Latest commit
22 lines (22 loc) · 787 Bytes
/
Copy pathgithub.html
File metadata and controls
22 lines (22 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!-- This file is here just for the purposes of the gh-pages branch to
allow the 3rd-party oauth service (getapi.co) to work -->
<scripttype="text/javascript">
functiongetParameterByName(name){
name=name.replace(/[\[]/,'\\[').replace(/[\]]/,'\\]');
varregex=newRegExp('[\\?&]'+name+'=([^&#]*)');
varresults=regex.exec(location.search);
returnresults===null ? '' : decodeURIComponent(results[1].replace(/\+/g,' '));
}
varaccessToken=getParameterByName('accessToken');
vartokenType=getParameterByName('tokenType');
varscope=getParameterByName('scope');
if(window.opener){
window.opener.window.useGitHubCodes({
accessToken: accessToken,
tokenType: tokenType,
scope: scope
});
}else{
alert('No parent window!');
}
</script>