{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/buddyup/pulls/comments/22461010","id":22461010,"diff_hunk":"@@ -109,31 +139,49 @@\n         answers[i].created = Utils.time_since(new Date(created));\n       }\n \n+      add_thread_header(question);\n       var html = nunjucks.render('thread.html', {\n+        user: user,\n         results: answers\n       });\n-      document.getElementById('comment-list').innerHTML = html;\n+      var list = document.getElementById('comment-list');\n+      list.insertAdjacentHTML('beforeend', html);\n     });\n   }\n \n   var QuestionController = {\n     init: function() {\n-      var form = document.getElementById('question_form');\n-      form.addEventListener('submit', submit_comment);\n+      var question_view = location.search ? true : false;\n+\n+      // if this is a question view, not arrived at from clicking/tapping\n+      // ask a question, hide the introduction section.\n+      if (question_view) {\n+        document.getElementById('thread-introduction').classList.add('hide');\n+      }\n+\n+      // we will need the user details whether the user is posting a question\n+      // or just viewing a question so, load the user during init\n+      User.get_user().then(function(response) {","path":"app/js/question_controller.js","position":98,"original_position":98,"commit_id":"5f6fcaf9dd8fed9dc065fd5c3cc6402db1a7a09b","original_commit_id":"5f6fcaf9dd8fed9dc065fd5c3cc6402db1a7a09b","user":{"login":"Rik","id":3653,"avatar_url":"https://avatars.githubusercontent.com/u/3653?v=3","gravatar_id":"","url":"https://api.github.com/users/Rik","html_url":"https://github.com/Rik","followers_url":"https://api.github.com/users/Rik/followers","following_url":"https://api.github.com/users/Rik/following{/other_user}","gists_url":"https://api.github.com/users/Rik/gists{/gist_id}","starred_url":"https://api.github.com/users/Rik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rik/subscriptions","organizations_url":"https://api.github.com/users/Rik/orgs","repos_url":"https://api.github.com/users/Rik/repos","events_url":"https://api.github.com/users/Rik/events{/privacy}","received_events_url":"https://api.github.com/users/Rik/received_events","type":"User","site_admin":false},"body":"Only the `user = response` line needs to be in this then function. Can you move everything else outside to make it clearer?","created_at":"2015-01-05T13:49:43Z","updated_at":"2015-01-05T13:49:43Z","html_url":"https://github.com/mozilla/buddyup/pull/43#discussion_r22461010","pull_request_url":"https://api.github.com/repos/mozilla/buddyup/pulls/43","_links":{"self":{"href":"https://api.github.com/repos/mozilla/buddyup/pulls/comments/22461010"},"html":{"href":"https://github.com/mozilla/buddyup/pull/43#discussion_r22461010"},"pull_request":{"href":"https://api.github.com/repos/mozilla/buddyup/pulls/43"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/buddyup/pulls/43","id":26807617,"html_url":"https://github.com/mozilla/buddyup/pull/43","diff_url":"https://github.com/mozilla/buddyup/pull/43.diff","patch_url":"https://github.com/mozilla/buddyup/pull/43.patch","issue_url":"https://api.github.com/repos/mozilla/buddyup/issues/43","number":43,"state":"open","locked":false,"title":"Bug1061592 separate thread header footer","user":{"login":"ossreleasefeed","id":80675,"avatar_url":"https://avatars.githubusercontent.com/u/80675?v=3","gravatar_id":"","url":"https://api.github.com/users/ossreleasefeed","html_url":"https://github.com/ossreleasefeed","followers_url":"https://api.github.com/users/ossreleasefeed/followers","following_url":"https://api.github.com/users/ossreleasefeed/following{/other_user}","gists_url":"https://api.github.com/users/ossreleasefeed/gists{/gist_id}","starred_url":"https://api.github.com/users/ossreleasefeed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ossreleasefeed/subscriptions","organizations_url":"https://api.github.com/users/ossreleasefeed/orgs","repos_url":"https://api.github.com/users/ossreleasefeed/repos","events_url":"https://api.github.com/users/ossreleasefeed/events{/privacy}","received_events_url":"https://api.github.com/users/ossreleasefeed/received_events","type":"User","site_admin":false},"body":"@Rik r? This one depends on pull request #41 ","created_at":"2015-01-05T06:01:17Z","updated_at":"2015-01-05T13:49:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"29817b522dafe0de39d79e91829ec2eab8928ca7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/buddyup/pulls/43/commits","review_comments_url":"https://api.github.com/repos/mozilla/buddyup/pulls/43/comments","review_comment_url":"https://api.github.com/repos/mozilla/buddyup/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mozilla/buddyup/issues/43/comments","statuses_url":"https://api.github.com/repos/mozilla/buddyup/statuses/5f6fcaf9dd8fed9dc065fd5c3cc6402db1a7a09b","head":{"label":"ossreleasefeed:bug1061592-separate-thread-header-footer","ref":"bug1061592-separate-thread-header-footer","sha":"5f6fcaf9dd8fed9dc065fd5c3cc6402db1a7a09b","user":{"login":"ossreleasefeed","id":80675,"avatar_url":"https://avatars.githubusercontent.com/u/80675?v=3","gravatar_id":"","url":"https://api.github.com/users/ossreleasefeed","html_url":"https://github.com/ossreleasefeed","followers_url":"https://api.github.com/users/ossreleasefeed/followers","following_url":"https://api.github.com/users/ossreleasefeed/following{/other_user}","gists_url":"https://api.github.com/users/ossreleasefeed/gists{/gist_id}","starred_url":"https://api.github.com/users/ossreleasefeed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ossreleasefeed/subscriptions","organizations_url":"https://api.github.com/users/ossreleasefeed/orgs","repos_url":"https://api.github.com/users/ossreleasefeed/repos","events_url":"https://api.github.com/users/ossreleasefeed/events{/privacy}","received_events_url":"https://api.github.com/users/ossreleasefeed/received_events","type":"User","site_admin":false},"repo":{"id":27462421,"name":"buddyup","full_name":"ossreleasefeed/buddyup","owner":{"login":"ossreleasefeed","id":80675,"avatar_url":"https://avatars.githubusercontent.com/u/80675?v=3","gravatar_id":"","url":"https://api.github.com/users/ossreleasefeed","html_url":"https://github.com/ossreleasefeed","followers_url":"https://api.github.com/users/ossreleasefeed/followers","following_url":"https://api.github.com/users/ossreleasefeed/following{/other_user}","gists_url":"https://api.github.com/users/ossreleasefeed/gists{/gist_id}","starred_url":"https://api.github.com/users/ossreleasefeed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ossreleasefeed/subscriptions","organizations_url":"https://api.github.com/users/ossreleasefeed/orgs","repos_url":"https://api.github.com/users/ossreleasefeed/repos","events_url":"https://api.github.com/users/ossreleasefeed/events{/privacy}","received_events_url":"https://api.github.com/users/ossreleasefeed/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ossreleasefeed/buddyup","description":"The UI repo for the buddy-up realtime support FirefoxOS app","fork":true,"url":"https://api.github.com/repos/ossreleasefeed/buddyup","forks_url":"https://api.github.com/repos/ossreleasefeed/buddyup/forks","keys_url":"https://api.github.com/repos/ossreleasefeed/buddyup/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ossreleasefeed/buddyup/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ossreleasefeed/buddyup/teams","hooks_url":"https://api.github.com/repos/ossreleasefeed/buddyup/hooks","issue_events_url":"https://api.github.com/repos/ossreleasefeed/buddyup/issues/events{/number}","events_url":"https://api.github.com/repos/ossreleasefeed/buddyup/events","assignees_url":"https://api.github.com/repos/ossreleasefeed/buddyup/assignees{/user}","branches_url":"https://api.github.com/repos/ossreleasefeed/buddyup/branches{/branch}","tags_url":"https://api.github.com/repos/ossreleasefeed/buddyup/tags","blobs_url":"https://api.github.com/repos/ossreleasefeed/buddyup/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ossreleasefeed/buddyup/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ossreleasefeed/buddyup/git/refs{/sha}","trees_url":"https://api.github.com/repos/ossreleasefeed/buddyup/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ossreleasefeed/buddyup/statuses/{sha}","languages_url":"https://api.github.com/repos/ossreleasefeed/buddyup/languages","stargazers_url":"https://api.github.com/repos/ossreleasefeed/buddyup/stargazers","contributors_url":"https://api.github.com/repos/ossreleasefeed/buddyup/contributors","subscribers_url":"https://api.github.com/repos/ossreleasefeed/buddyup/subscribers","subscription_url":"https://api.github.com/repos/ossreleasefeed/buddyup/subscription","commits_url":"https://api.github.com/repos/ossreleasefeed/buddyup/commits{/sha}","git_commits_url":"https://api.github.com/repos/ossreleasefeed/buddyup/git/commits{/sha}","comments_url":"https://api.github.com/repos/ossreleasefeed/buddyup/comments{/number}","issue_comment_url":"https://api.github.com/repos/ossreleasefeed/buddyup/issues/comments/{number}","contents_url":"https://api.github.com/repos/ossreleasefeed/buddyup/contents/{+path}","compare_url":"https://api.github.com/repos/ossreleasefeed/buddyup/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ossreleasefeed/buddyup/merges","archive_url":"https://api.github.com/repos/ossreleasefeed/buddyup/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ossreleasefeed/buddyup/downloads","issues_url":"https://api.github.com/repos/ossreleasefeed/buddyup/issues{/number}","pulls_url":"https://api.github.com/repos/ossreleasefeed/buddyup/pulls{/number}","milestones_url":"https://api.github.com/repos/ossreleasefeed/buddyup/milestones{/number}","notifications_url":"https://api.github.com/repos/ossreleasefeed/buddyup/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ossreleasefeed/buddyup/labels{/name}","releases_url":"https://api.github.com/repos/ossreleasefeed/buddyup/releases{/id}","created_at":"2014-12-03T01:15:05Z","updated_at":"2014-12-29T10:19:15Z","pushed_at":"2015-01-05T13:20:49Z","git_url":"git://github.com/ossreleasefeed/buddyup.git","ssh_url":"git@github.com:ossreleasefeed/buddyup.git","clone_url":"https://github.com/ossreleasefeed/buddyup.git","svn_url":"https://github.com/ossreleasefeed/buddyup","homepage":"","size":33119,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mozilla:master","ref":"master","sha":"a1cded88a28731a6263c80a86bfe99139f2e684d","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":18778634,"name":"buddyup","full_name":"mozilla/buddyup","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/buddyup","description":"The UI repo for the buddy-up realtime support FirefoxOS app","fork":false,"url":"https://api.github.com/repos/mozilla/buddyup","forks_url":"https://api.github.com/repos/mozilla/buddyup/forks","keys_url":"https://api.github.com/repos/mozilla/buddyup/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/buddyup/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/buddyup/teams","hooks_url":"https://api.github.com/repos/mozilla/buddyup/hooks","issue_events_url":"https://api.github.com/repos/mozilla/buddyup/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/buddyup/events","assignees_url":"https://api.github.com/repos/mozilla/buddyup/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/buddyup/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/buddyup/tags","blobs_url":"https://api.github.com/repos/mozilla/buddyup/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/buddyup/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/buddyup/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/buddyup/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/buddyup/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/buddyup/languages","stargazers_url":"https://api.github.com/repos/mozilla/buddyup/stargazers","contributors_url":"https://api.github.com/repos/mozilla/buddyup/contributors","subscribers_url":"https://api.github.com/repos/mozilla/buddyup/subscribers","subscription_url":"https://api.github.com/repos/mozilla/buddyup/subscription","commits_url":"https://api.github.com/repos/mozilla/buddyup/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/buddyup/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/buddyup/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/buddyup/issues/comments/{number}","contents_url":"https://api.github.com/repos/mozilla/buddyup/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/buddyup/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/buddyup/merges","archive_url":"https://api.github.com/repos/mozilla/buddyup/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/buddyup/downloads","issues_url":"https://api.github.com/repos/mozilla/buddyup/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/buddyup/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/buddyup/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/buddyup/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/buddyup/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/buddyup/releases{/id}","created_at":"2014-04-14T22:11:58Z","updated_at":"2014-12-29T10:36:16Z","pushed_at":"2014-12-29T10:36:15Z","git_url":"git://github.com/mozilla/buddyup.git","ssh_url":"git@github.com:mozilla/buddyup.git","clone_url":"https://github.com/mozilla/buddyup.git","svn_url":"https://github.com/mozilla/buddyup","homepage":"","size":34130,"stargazers_count":3,"watchers_count":3,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":8,"forks":2,"open_issues":8,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/buddyup/pulls/43"},"html":{"href":"https://github.com/mozilla/buddyup/pull/43"},"issue":{"href":"https://api.github.com/repos/mozilla/buddyup/issues/43"},"comments":{"href":"https://api.github.com/repos/mozilla/buddyup/issues/43/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/buddyup/pulls/43/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/buddyup/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mozilla/buddyup/pulls/43/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/buddyup/statuses/5f6fcaf9dd8fed9dc065fd5c3cc6402db1a7a09b"}}}}