{"action":"created","comment":{"url":"https://api.github.com/repos/dan3lson/lifes_a_beach/pulls/comments/34308045","id":34308045,"diff_hunk":"@@ -0,0 +1,111 @@\n+$(document).ready(function() {\n+  var flag = true;\n+  var flag2 = true;\n+  $(\".upvote\").on(\"click\", function( event ) {\n+    var reviewId = event.toElement.className.match(/\\d+/)[0];\n+    var score = document.getElementById(\"review-\" +\n+      reviewId +\n+      \"-score\"\n+    ).innerHTML;\n+    score = parseInt(score);\n+\n+    if (flag) {\n+      event.preventDefault();\n+      event.stopPropagation();\n+\n+      score++;\n+      document.getElementById(\"review-\" + reviewId + \"-score\").textContent = score;\n+\n+      // also hide upvote button\n+      var post_url = \"/reviews/\" + reviewId + \"/upvotes\";\n+\n+      $.ajax({\n+        type: \"POST\",\n+        url: post_url,\n+        dataType: \"json\",\n+        complete: function() {\n+          var reviewClass = \".review-\" + reviewId + \".upvote\";\n+          $(reviewClass).attr(\"data-method\", \"delete\");\n+          $(reviewClass).text(\"Delete Upvote\");\n+        }\n+      });\n+    }else{","path":"app/assets/javascripts/votes.js","position":32,"original_position":32,"commit_id":"ab35ce0899fcc4e224df7e1464b9234e8722ef48","original_commit_id":"ab35ce0899fcc4e224df7e1464b9234e8722ef48","user":{"login":"vikram7","id":7072744,"avatar_url":"https://avatars.githubusercontent.com/u/7072744?v=3","gravatar_id":"","url":"https://api.github.com/users/vikram7","html_url":"https://github.com/vikram7","followers_url":"https://api.github.com/users/vikram7/followers","following_url":"https://api.github.com/users/vikram7/following{/other_user}","gists_url":"https://api.github.com/users/vikram7/gists{/gist_id}","starred_url":"https://api.github.com/users/vikram7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vikram7/subscriptions","organizations_url":"https://api.github.com/users/vikram7/orgs","repos_url":"https://api.github.com/users/vikram7/repos","events_url":"https://api.github.com/users/vikram7/events{/privacy}","received_events_url":"https://api.github.com/users/vikram7/received_events","type":"User","site_admin":false},"body":"spacing: `} else {`","created_at":"2015-07-09T21:50:48Z","updated_at":"2015-07-09T21:50:48Z","html_url":"https://github.com/dan3lson/lifes_a_beach/pull/22#discussion_r34308045","pull_request_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/pulls/22","_links":{"self":{"href":"https://api.github.com/repos/dan3lson/lifes_a_beach/pulls/comments/34308045"},"html":{"href":"https://github.com/dan3lson/lifes_a_beach/pull/22#discussion_r34308045"},"pull_request":{"href":"https://api.github.com/repos/dan3lson/lifes_a_beach/pulls/22"}}},"pull_request":{"url":"https://api.github.com/repos/dan3lson/lifes_a_beach/pulls/22","id":39528681,"html_url":"https://github.com/dan3lson/lifes_a_beach/pull/22","diff_url":"https://github.com/dan3lson/lifes_a_beach/pull/22.diff","patch_url":"https://github.com/dan3lson/lifes_a_beach/pull/22.patch","issue_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/issues/22","number":22,"state":"open","locked":false,"title":"[RFR] AJAX. All non-JS Hound violations fixed","user":{"login":"jford8820","id":11723485,"avatar_url":"https://avatars.githubusercontent.com/u/11723485?v=3","gravatar_id":"","url":"https://api.github.com/users/jford8820","html_url":"https://github.com/jford8820","followers_url":"https://api.github.com/users/jford8820/followers","following_url":"https://api.github.com/users/jford8820/following{/other_user}","gists_url":"https://api.github.com/users/jford8820/gists{/gist_id}","starred_url":"https://api.github.com/users/jford8820/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jford8820/subscriptions","organizations_url":"https://api.github.com/users/jford8820/orgs","repos_url":"https://api.github.com/users/jford8820/repos","events_url":"https://api.github.com/users/jford8820/events{/privacy}","received_events_url":"https://api.github.com/users/jford8820/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-08T22:03:55Z","updated_at":"2015-07-09T21:50:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/pulls/22/commits","review_comments_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/pulls/22/comments","review_comment_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/issues/22/comments","statuses_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/statuses/ab35ce0899fcc4e224df7e1464b9234e8722ef48","head":{"label":"dan3lson:wip-wip-jf","ref":"wip-wip-jf","sha":"ab35ce0899fcc4e224df7e1464b9234e8722ef48","user":{"login":"dan3lson","id":11579207,"avatar_url":"https://avatars.githubusercontent.com/u/11579207?v=3","gravatar_id":"","url":"https://api.github.com/users/dan3lson","html_url":"https://github.com/dan3lson","followers_url":"https://api.github.com/users/dan3lson/followers","following_url":"https://api.github.com/users/dan3lson/following{/other_user}","gists_url":"https://api.github.com/users/dan3lson/gists{/gist_id}","starred_url":"https://api.github.com/users/dan3lson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dan3lson/subscriptions","organizations_url":"https://api.github.com/users/dan3lson/orgs","repos_url":"https://api.github.com/users/dan3lson/repos","events_url":"https://api.github.com/users/dan3lson/events{/privacy}","received_events_url":"https://api.github.com/users/dan3lson/received_events","type":"User","site_admin":false},"repo":{"id":38254625,"name":"lifes_a_beach","full_name":"dan3lson/lifes_a_beach","owner":{"login":"dan3lson","id":11579207,"avatar_url":"https://avatars.githubusercontent.com/u/11579207?v=3","gravatar_id":"","url":"https://api.github.com/users/dan3lson","html_url":"https://github.com/dan3lson","followers_url":"https://api.github.com/users/dan3lson/followers","following_url":"https://api.github.com/users/dan3lson/following{/other_user}","gists_url":"https://api.github.com/users/dan3lson/gists{/gist_id}","starred_url":"https://api.github.com/users/dan3lson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dan3lson/subscriptions","organizations_url":"https://api.github.com/users/dan3lson/orgs","repos_url":"https://api.github.com/users/dan3lson/repos","events_url":"https://api.github.com/users/dan3lson/events{/privacy}","received_events_url":"https://api.github.com/users/dan3lson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dan3lson/lifes_a_beach","description":"Beach review site built with Rails and TDD.","fork":false,"url":"https://api.github.com/repos/dan3lson/lifes_a_beach","forks_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/forks","keys_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/teams","hooks_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/hooks","issue_events_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/issues/events{/number}","events_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/events","assignees_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/assignees{/user}","branches_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/branches{/branch}","tags_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/tags","blobs_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/git/refs{/sha}","trees_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/statuses/{sha}","languages_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/languages","stargazers_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/stargazers","contributors_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/contributors","subscribers_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/subscribers","subscription_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/subscription","commits_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/commits{/sha}","git_commits_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/git/commits{/sha}","comments_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/comments{/number}","issue_comment_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/issues/comments{/number}","contents_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/contents/{+path}","compare_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/merges","archive_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/downloads","issues_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/issues{/number}","pulls_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/pulls{/number}","milestones_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/milestones{/number}","notifications_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/labels{/name}","releases_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/releases{/id}","created_at":"2015-06-29T15:19:29Z","updated_at":"2015-06-29T21:38:20Z","pushed_at":"2015-07-09T21:40:38Z","git_url":"git://github.com/dan3lson/lifes_a_beach.git","ssh_url":"git@github.com:dan3lson/lifes_a_beach.git","clone_url":"https://github.com/dan3lson/lifes_a_beach.git","svn_url":"https://github.com/dan3lson/lifes_a_beach","homepage":null,"size":576,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"base":{"label":"dan3lson:master","ref":"master","sha":"69346ae1c5a8a3e11c109e189cfde0daf8499ba5","user":{"login":"dan3lson","id":11579207,"avatar_url":"https://avatars.githubusercontent.com/u/11579207?v=3","gravatar_id":"","url":"https://api.github.com/users/dan3lson","html_url":"https://github.com/dan3lson","followers_url":"https://api.github.com/users/dan3lson/followers","following_url":"https://api.github.com/users/dan3lson/following{/other_user}","gists_url":"https://api.github.com/users/dan3lson/gists{/gist_id}","starred_url":"https://api.github.com/users/dan3lson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dan3lson/subscriptions","organizations_url":"https://api.github.com/users/dan3lson/orgs","repos_url":"https://api.github.com/users/dan3lson/repos","events_url":"https://api.github.com/users/dan3lson/events{/privacy}","received_events_url":"https://api.github.com/users/dan3lson/received_events","type":"User","site_admin":false},"repo":{"id":38254625,"name":"lifes_a_beach","full_name":"dan3lson/lifes_a_beach","owner":{"login":"dan3lson","id":11579207,"avatar_url":"https://avatars.githubusercontent.com/u/11579207?v=3","gravatar_id":"","url":"https://api.github.com/users/dan3lson","html_url":"https://github.com/dan3lson","followers_url":"https://api.github.com/users/dan3lson/followers","following_url":"https://api.github.com/users/dan3lson/following{/other_user}","gists_url":"https://api.github.com/users/dan3lson/gists{/gist_id}","starred_url":"https://api.github.com/users/dan3lson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dan3lson/subscriptions","organizations_url":"https://api.github.com/users/dan3lson/orgs","repos_url":"https://api.github.com/users/dan3lson/repos","events_url":"https://api.github.com/users/dan3lson/events{/privacy}","received_events_url":"https://api.github.com/users/dan3lson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dan3lson/lifes_a_beach","description":"Beach review site built with Rails and TDD.","fork":false,"url":"https://api.github.com/repos/dan3lson/lifes_a_beach","forks_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/forks","keys_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/teams","hooks_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/hooks","issue_events_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/issues/events{/number}","events_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/events","assignees_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/assignees{/user}","branches_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/branches{/branch}","tags_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/tags","blobs_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/git/refs{/sha}","trees_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/statuses/{sha}","languages_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/languages","stargazers_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/stargazers","contributors_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/contributors","subscribers_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/subscribers","subscription_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/subscription","commits_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/commits{/sha}","git_commits_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/git/commits{/sha}","comments_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/comments{/number}","issue_comment_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/issues/comments{/number}","contents_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/contents/{+path}","compare_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/merges","archive_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/downloads","issues_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/issues{/number}","pulls_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/pulls{/number}","milestones_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/milestones{/number}","notifications_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/labels{/name}","releases_url":"https://api.github.com/repos/dan3lson/lifes_a_beach/releases{/id}","created_at":"2015-06-29T15:19:29Z","updated_at":"2015-06-29T21:38:20Z","pushed_at":"2015-07-09T21:40:38Z","git_url":"git://github.com/dan3lson/lifes_a_beach.git","ssh_url":"git@github.com:dan3lson/lifes_a_beach.git","clone_url":"https://github.com/dan3lson/lifes_a_beach.git","svn_url":"https://github.com/dan3lson/lifes_a_beach","homepage":null,"size":576,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":5,"forks":0,"open_issues":5,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dan3lson/lifes_a_beach/pulls/22"},"html":{"href":"https://github.com/dan3lson/lifes_a_beach/pull/22"},"issue":{"href":"https://api.github.com/repos/dan3lson/lifes_a_beach/issues/22"},"comments":{"href":"https://api.github.com/repos/dan3lson/lifes_a_beach/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/dan3lson/lifes_a_beach/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/dan3lson/lifes_a_beach/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dan3lson/lifes_a_beach/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/dan3lson/lifes_a_beach/statuses/ab35ce0899fcc4e224df7e1464b9234e8722ef48"}}}}