summaryrefslogtreecommitdiff
path: root/static/oauth-callback.html
diff options
context:
space:
mode:
authorrekado <rekado@elephly.net>2013-01-24 17:05:17 +0800
committerrekado <rekado@elephly.net>2013-01-24 17:05:17 +0800
commitf5f793124fe7ae9950b0fd9457374946b3b6c294 (patch)
treec9a96b01f6e9572acb702928e5d2426e449cef5f /static/oauth-callback.html
use Hakyll instead of middleman
Diffstat (limited to 'static/oauth-callback.html')
-rw-r--r--static/oauth-callback.html24
1 files changed, 24 insertions, 0 deletions
diff --git a/static/oauth-callback.html b/static/oauth-callback.html
new file mode 100644
index 0000000..0a75eb9
--- /dev/null
+++ b/static/oauth-callback.html
@@ -0,0 +1,24 @@
+<script type="text/javascript">
+ q = window.location.search.substring(1);
+ function querySt(name) {
+ vars = q.split("&");
+ for (i=0;i<vars.length;i++) {
+ pair = vars[i].split("=");
+ if (pair[0] == name) {
+ return pair[1];
+ }
+ }
+ }
+
+ if (querySt("error") != undefined)
+ {
+ document.write("<h1>Error</h1><p>Oh, dear! This should not have happened.");
+ document.write(querySt("error_description").replace(/\+/gi, ' '));
+ }
+ else {
+ document.write("<h1>Connected!</h1>");
+ document.write("<p>This is your authentication code:</p>");
+ document.write("<p><span class='code'>"+querySt("code")+"</span></p>");
+ document.write("<p>Copy the code and add it to your configuration file in <span class='code'>/etc/soundcli.conf</span> or <span class='code'>$XDG_CONFIG/soundcli/soundcli.conf</span></p>");
+ }
+</script>