From 0c1c8b274f8ef004b4d87a7ba95345a1e67d94de Mon Sep 17 00:00:00 2001 From: benweet Date: Sat, 13 Apr 2013 00:09:34 +0100 Subject: [PATCH] GitHub publishing enhancements --- github-oauth-client.html | 10 +++++---- index.html | 25 +++++++--------------- js/file-manager.js | 5 ++--- js/github-helper.js | 45 ++++++++++++++++++++++++++-------------- js/publisher.js | 3 +-- 5 files changed, 46 insertions(+), 42 deletions(-) diff --git a/github-oauth-client.html b/github-oauth-client.html index 1df0a6f7..7609c23e 100644 --- a/github-oauth-client.html +++ b/github-oauth-client.html @@ -12,12 +12,14 @@ } var client_id = getParameter("client_id"); var code = getParameter("code"); - if (code) { - localStorage["githubCode"] = code; - window.close(); - } else if (client_id) { + if (client_id) { window.location.href = "https://github.com/login/oauth/authorize?client_id=" + client_id + "&scope=repo"; + } else { + if (code) { + localStorage["githubCode"] = code; + } + window.close(); } diff --git a/index.html b/index.html index 79caa8de..1fea1e8e 100644 --- a/index.html +++ b/index.html @@ -258,33 +258,25 @@