github.html 532 B

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