$(function() {
  $.get('/../template.html', function(data) {
    var template = Handlebars.compile(data);
    $.ajax({
      contentType: 'application/json',
      headers: {
        token: $.cookie('token')
      },
      dataType: 'json',
      success: function(theta) {
        console.log(theta);
        for (var i = 0; i < theta.length; i += 1) {
          var html = template(theta[i]);
          $('#chords').append(html);
        }
      },
      error: function() { console.log('Device control failed'); },
      processData: false,
      type: 'GET',
      url: '/profile'
    });
  });
});

@@ -1,20 +1,15 @@
 $(
-function()
+() =%3E
  %7B%0A  $.g
@@ -16,16 +16,21 @@
 et('/../
+user_
 template
@@ -41,22 +41,17 @@
 l', 
-function
 (data)
+ =%3E
  %7B%0A 
@@ -302,33 +302,639 @@
     
-for (var i = 0; i %3C theta
+var userinfo = theta.userinfo%5B0%5D;%0A        console.log(userinfo);%0A        var user = template(userinfo);%0A        $('#userinfo').append(user);%0A      %7D,%0A      error: function(data) %7B console.log(data); %7D,%0A      processData: false,%0A      type: 'GET',%0A      url: '/profile'%0A    %7D);%0A  %7D);%0A  $.get('/../template.html', (data) =%3E %7B%0A    var template = Handlebars.compile(data);%0A    $.ajax(%7B%0A      contentType: 'application/json',%0A      headers: %7B%0A        token: $.cookie('token')%0A      %7D,%0A      dataType: 'json',%0A      success: function(theta) %7B%0A        console.log(theta);%0A        var chord = theta.chord;%0A        for (var i = 0; i %3C chord
 .len
@@ -962,20 +962,22 @@
     var 
-html
+chordm
  = templ
@@ -980,21 +980,21 @@
 emplate(
-theta
+chord
 %5Bi%5D);%0A  
@@ -1021,20 +1021,22 @@
 .append(
-html
+chordm
 );%0A     
@@ -1071,16 +1071,20 @@
 unction(
+data
 ) %7B cons
@@ -1095,31 +1095,12 @@
 log(
-'Device control failed'
+data
 ); %7D

include user_template