summaryrefslogtreecommitdiff
path: root/non-posts/oauth-callback.html
blob: e215b2989707843bb30b06b66c7c05f252cb103a (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
title: SoundCLI
---
<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>