<!DOCTYPE html> <html lang="en"> <head> <script type="text/javascript"> function getParameter(name) { var regex = new RegExp(name + "=(.+?)(&|$)"); try { return decodeURI(regex.exec(location.search)[1]); } catch (e) { return undefined; } } var client_id = getParameter("client_id"); var code = getParameter("code"); if (client_id) { window.location.href = "https://github.com/login/oauth/authorize?client_id=" + client_id + "&scope=repo,gist"; } else { if (code) { localStorage["githubCode"] = code; } window.close(); } </script> </head> </html>