Site updated at 2017-02-18 04:56:11 UTC

This commit is contained in:
Travis CI 2017-02-18 04:56:11 +00:00
parent 4e5e627df1
commit 2498bbf88b
23 changed files with 44 additions and 38 deletions

View file

@ -499,15 +499,21 @@
});
}
function qs(key) {
key = key.replace(/[*+?^$.\[\]{}()|\\\/]/g, "\\$&"); // escape RegEx meta chars
var match = location.search.match(new RegExp("[?&]"+key+"=([^&]+)(&|$)"));
return match && decodeURIComponent(match[1].replace(/\+/g, " "));
}
$(document).ready(function(){
populateCountries("country", "region");
var spinner = new Spinner().spin(document.getElementById('spinner'));
var codeCheck = window.location.href.match(/\?code=(.*)/);
var codeCheck = qs('code');
if (codeCheck && codeCheck.length > 0) {
$.ajax({
type: "POST",
url: "https://cla.home-assistant.io/github/exchange",
data: JSON.stringify({"code": codeCheck[1]}),
data: JSON.stringify({"code": codeCheck}),
contentType: "application/json",
}).done(function(data){
var uri = window.location.toString();