aboutsummaryrefslogtreecommitdiff
path: root/auth/hash.js
blob: 7cb701a66e3030e7a1601ab08ef51796628caeb7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
function getHashValue(key) {
  // http://stackoverflow.com/a/11920807
  return location.hash.match(new RegExp(key+'=([^&]*)'))[1];
}

function setValue(document_id, hash_key) {
  document.getElementById(document_id).innerHTML = getHashValue(hash_key);
}

function extractValues() {
  setValue("access-token", "access_token");
}