{"action":"created","comment":{"url":"https://api.github.com/repos/sindresorhus/refined-github/pulls/comments/58540367","id":58540367,"diff_hunk":"@@ -0,0 +1,60 @@\n+const addReactionParticipants = currentUser => {\n+\t$('.comment-reactions').each((index, reactionsContainer) => {\n+\t\tconst $reactionsContainer = $(reactionsContainer);\n+\t\tif (!$reactionsContainer.hasClass('has-reactions')) {\n+\t\t\treturn;\n+\t\t}\n+\n+\t\tconst $reactionButtons = $reactionsContainer.find('.comment-reactions-options .reaction-summary-item[aria-label]');\n+\n+\t\t$reactionButtons.each((index, element) => {\n+\t\t\telement.addEventListener('click', () => {","path":"extension/addreactionparticipants.js","position":null,"original_position":11,"commit_id":"0d2845ba519cf42b67a01013d13e35d1c44bde39","original_commit_id":"2deb03d1ab664b0bae814bae81c8ffc2d99b4d80","user":{"login":"paulmolluzzo","id":737065,"avatar_url":"https://avatars.githubusercontent.com/u/737065?v=3","gravatar_id":"","url":"https://api.github.com/users/paulmolluzzo","html_url":"https://github.com/paulmolluzzo","followers_url":"https://api.github.com/users/paulmolluzzo/followers","following_url":"https://api.github.com/users/paulmolluzzo/following{/other_user}","gists_url":"https://api.github.com/users/paulmolluzzo/gists{/gist_id}","starred_url":"https://api.github.com/users/paulmolluzzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulmolluzzo/subscriptions","organizations_url":"https://api.github.com/users/paulmolluzzo/orgs","repos_url":"https://api.github.com/users/paulmolluzzo/repos","events_url":"https://api.github.com/users/paulmolluzzo/events{/privacy}","received_events_url":"https://api.github.com/users/paulmolluzzo/received_events","type":"User","site_admin":false},"body":"OK, this is added in. Now there's one event listener and it's only applied once. Before it was reapplying the event listeners every time you clicked.","created_at":"2016-04-05T13:48:12Z","updated_at":"2016-04-05T13:48:13Z","html_url":"https://github.com/sindresorhus/refined-github/pull/145#discussion_r58540367","pull_request_url":"https://api.github.com/repos/sindresorhus/refined-github/pulls/145","_links":{"self":{"href":"https://api.github.com/repos/sindresorhus/refined-github/pulls/comments/58540367"},"html":{"href":"https://github.com/sindresorhus/refined-github/pull/145#discussion_r58540367"},"pull_request":{"href":"https://api.github.com/repos/sindresorhus/refined-github/pulls/145"}}},"pull_request":{"url":"https://api.github.com/repos/sindresorhus/refined-github/pulls/145","id":65056742,"html_url":"https://github.com/sindresorhus/refined-github/pull/145","diff_url":"https://github.com/sindresorhus/refined-github/pull/145.diff","patch_url":"https://github.com/sindresorhus/refined-github/pull/145.patch","issue_url":"https://api.github.com/repos/sindresorhus/refined-github/issues/145","number":145,"state":"open","locked":false,"title":"Add avatars for reactions participants","user":{"login":"paulmolluzzo","id":737065,"avatar_url":"https://avatars.githubusercontent.com/u/737065?v=3","gravatar_id":"","url":"https://api.github.com/users/paulmolluzzo","html_url":"https://github.com/paulmolluzzo","followers_url":"https://api.github.com/users/paulmolluzzo/followers","following_url":"https://api.github.com/users/paulmolluzzo/following{/other_user}","gists_url":"https://api.github.com/users/paulmolluzzo/gists{/gist_id}","starred_url":"https://api.github.com/users/paulmolluzzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulmolluzzo/subscriptions","organizations_url":"https://api.github.com/users/paulmolluzzo/orgs","repos_url":"https://api.github.com/users/paulmolluzzo/repos","events_url":"https://api.github.com/users/paulmolluzzo/events{/privacy}","received_events_url":"https://api.github.com/users/paulmolluzzo/received_events","type":"User","site_admin":false},"body":"Hat tip to @hkdobrev for getting this started and finding the way to get GH user avatars.\r\n\r\nThis extends the work @hkdobrev did on a new branch that is also up to date with `master`. Basically, it takes the avatars of people who add a reaction to a comment and appends their avatar. I am only appending the first 3 (or less) avatars because it quickly gets crazy, and then just add `+${remainder}` at the end.\r\n\r\nSuggestions on the design are welcome. I'm thinking we can even get rid of the original number, but not sure.\r\n\r\nExample:\r\n![reaction-avatars](https://cloud.githubusercontent.com/assets/737065/14230374/ca390f4a-f921-11e5-92a8-c1d81ce51b4c.png)\r\n","created_at":"2016-04-03T02:25:58Z","updated_at":"2016-04-05T13:48:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"59e08de4c1539372650bf667f8afeefd20c65498","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sindresorhus/refined-github/pulls/145/commits","review_comments_url":"https://api.github.com/repos/sindresorhus/refined-github/pulls/145/comments","review_comment_url":"https://api.github.com/repos/sindresorhus/refined-github/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sindresorhus/refined-github/issues/145/comments","statuses_url":"https://api.github.com/repos/sindresorhus/refined-github/statuses/0d2845ba519cf42b67a01013d13e35d1c44bde39","head":{"label":"sindresorhus:reactions-participants-new","ref":"reactions-participants-new","sha":"0d2845ba519cf42b67a01013d13e35d1c44bde39","user":{"login":"sindresorhus","id":170270,"avatar_url":"https://avatars.githubusercontent.com/u/170270?v=3","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/received_events","type":"User","site_admin":false},"repo":{"id":51769689,"name":"refined-github","full_name":"sindresorhus/refined-github","owner":{"login":"sindresorhus","id":170270,"avatar_url":"https://avatars.githubusercontent.com/u/170270?v=3","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sindresorhus/refined-github","description":"Chrome extension that simplifies the GitHub interface and adds useful features","fork":false,"url":"https://api.github.com/repos/sindresorhus/refined-github","forks_url":"https://api.github.com/repos/sindresorhus/refined-github/forks","keys_url":"https://api.github.com/repos/sindresorhus/refined-github/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sindresorhus/refined-github/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sindresorhus/refined-github/teams","hooks_url":"https://api.github.com/repos/sindresorhus/refined-github/hooks","issue_events_url":"https://api.github.com/repos/sindresorhus/refined-github/issues/events{/number}","events_url":"https://api.github.com/repos/sindresorhus/refined-github/events","assignees_url":"https://api.github.com/repos/sindresorhus/refined-github/assignees{/user}","branches_url":"https://api.github.com/repos/sindresorhus/refined-github/branches{/branch}","tags_url":"https://api.github.com/repos/sindresorhus/refined-github/tags","blobs_url":"https://api.github.com/repos/sindresorhus/refined-github/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sindresorhus/refined-github/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sindresorhus/refined-github/git/refs{/sha}","trees_url":"https://api.github.com/repos/sindresorhus/refined-github/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sindresorhus/refined-github/statuses/{sha}","languages_url":"https://api.github.com/repos/sindresorhus/refined-github/languages","stargazers_url":"https://api.github.com/repos/sindresorhus/refined-github/stargazers","contributors_url":"https://api.github.com/repos/sindresorhus/refined-github/contributors","subscribers_url":"https://api.github.com/repos/sindresorhus/refined-github/subscribers","subscription_url":"https://api.github.com/repos/sindresorhus/refined-github/subscription","commits_url":"https://api.github.com/repos/sindresorhus/refined-github/commits{/sha}","git_commits_url":"https://api.github.com/repos/sindresorhus/refined-github/git/commits{/sha}","comments_url":"https://api.github.com/repos/sindresorhus/refined-github/comments{/number}","issue_comment_url":"https://api.github.com/repos/sindresorhus/refined-github/issues/comments{/number}","contents_url":"https://api.github.com/repos/sindresorhus/refined-github/contents/{+path}","compare_url":"https://api.github.com/repos/sindresorhus/refined-github/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sindresorhus/refined-github/merges","archive_url":"https://api.github.com/repos/sindresorhus/refined-github/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sindresorhus/refined-github/downloads","issues_url":"https://api.github.com/repos/sindresorhus/refined-github/issues{/number}","pulls_url":"https://api.github.com/repos/sindresorhus/refined-github/pulls{/number}","milestones_url":"https://api.github.com/repos/sindresorhus/refined-github/milestones{/number}","notifications_url":"https://api.github.com/repos/sindresorhus/refined-github/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sindresorhus/refined-github/labels{/name}","releases_url":"https://api.github.com/repos/sindresorhus/refined-github/releases{/id}","deployments_url":"https://api.github.com/repos/sindresorhus/refined-github/deployments","created_at":"2016-02-15T16:45:02Z","updated_at":"2016-04-05T13:22:07Z","pushed_at":"2016-04-05T13:47:19Z","git_url":"git://github.com/sindresorhus/refined-github.git","ssh_url":"git@github.com:sindresorhus/refined-github.git","clone_url":"https://github.com/sindresorhus/refined-github.git","svn_url":"https://github.com/sindresorhus/refined-github","homepage":"https://chrome.google.com/webstore/detail/refined-github/hlepfoohegkhhmjieoechaddaejaokhf","size":1370,"stargazers_count":570,"watchers_count":570,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":42,"mirror_url":null,"open_issues_count":24,"forks":42,"open_issues":24,"watchers":570,"default_branch":"master"}},"base":{"label":"sindresorhus:master","ref":"master","sha":"b818a1e5d62f29aca89985463b37b4ab7cac5b5d","user":{"login":"sindresorhus","id":170270,"avatar_url":"https://avatars.githubusercontent.com/u/170270?v=3","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/received_events","type":"User","site_admin":false},"repo":{"id":51769689,"name":"refined-github","full_name":"sindresorhus/refined-github","owner":{"login":"sindresorhus","id":170270,"avatar_url":"https://avatars.githubusercontent.com/u/170270?v=3","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sindresorhus/refined-github","description":"Chrome extension that simplifies the GitHub interface and adds useful features","fork":false,"url":"https://api.github.com/repos/sindresorhus/refined-github","forks_url":"https://api.github.com/repos/sindresorhus/refined-github/forks","keys_url":"https://api.github.com/repos/sindresorhus/refined-github/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sindresorhus/refined-github/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sindresorhus/refined-github/teams","hooks_url":"https://api.github.com/repos/sindresorhus/refined-github/hooks","issue_events_url":"https://api.github.com/repos/sindresorhus/refined-github/issues/events{/number}","events_url":"https://api.github.com/repos/sindresorhus/refined-github/events","assignees_url":"https://api.github.com/repos/sindresorhus/refined-github/assignees{/user}","branches_url":"https://api.github.com/repos/sindresorhus/refined-github/branches{/branch}","tags_url":"https://api.github.com/repos/sindresorhus/refined-github/tags","blobs_url":"https://api.github.com/repos/sindresorhus/refined-github/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sindresorhus/refined-github/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sindresorhus/refined-github/git/refs{/sha}","trees_url":"https://api.github.com/repos/sindresorhus/refined-github/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sindresorhus/refined-github/statuses/{sha}","languages_url":"https://api.github.com/repos/sindresorhus/refined-github/languages","stargazers_url":"https://api.github.com/repos/sindresorhus/refined-github/stargazers","contributors_url":"https://api.github.com/repos/sindresorhus/refined-github/contributors","subscribers_url":"https://api.github.com/repos/sindresorhus/refined-github/subscribers","subscription_url":"https://api.github.com/repos/sindresorhus/refined-github/subscription","commits_url":"https://api.github.com/repos/sindresorhus/refined-github/commits{/sha}","git_commits_url":"https://api.github.com/repos/sindresorhus/refined-github/git/commits{/sha}","comments_url":"https://api.github.com/repos/sindresorhus/refined-github/comments{/number}","issue_comment_url":"https://api.github.com/repos/sindresorhus/refined-github/issues/comments{/number}","contents_url":"https://api.github.com/repos/sindresorhus/refined-github/contents/{+path}","compare_url":"https://api.github.com/repos/sindresorhus/refined-github/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sindresorhus/refined-github/merges","archive_url":"https://api.github.com/repos/sindresorhus/refined-github/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sindresorhus/refined-github/downloads","issues_url":"https://api.github.com/repos/sindresorhus/refined-github/issues{/number}","pulls_url":"https://api.github.com/repos/sindresorhus/refined-github/pulls{/number}","milestones_url":"https://api.github.com/repos/sindresorhus/refined-github/milestones{/number}","notifications_url":"https://api.github.com/repos/sindresorhus/refined-github/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sindresorhus/refined-github/labels{/name}","releases_url":"https://api.github.com/repos/sindresorhus/refined-github/releases{/id}","deployments_url":"https://api.github.com/repos/sindresorhus/refined-github/deployments","created_at":"2016-02-15T16:45:02Z","updated_at":"2016-04-05T13:22:07Z","pushed_at":"2016-04-05T13:47:19Z","git_url":"git://github.com/sindresorhus/refined-github.git","ssh_url":"git@github.com:sindresorhus/refined-github.git","clone_url":"https://github.com/sindresorhus/refined-github.git","svn_url":"https://github.com/sindresorhus/refined-github","homepage":"https://chrome.google.com/webstore/detail/refined-github/hlepfoohegkhhmjieoechaddaejaokhf","size":1370,"stargazers_count":570,"watchers_count":570,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":42,"mirror_url":null,"open_issues_count":24,"forks":42,"open_issues":24,"watchers":570,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sindresorhus/refined-github/pulls/145"},"html":{"href":"https://github.com/sindresorhus/refined-github/pull/145"},"issue":{"href":"https://api.github.com/repos/sindresorhus/refined-github/issues/145"},"comments":{"href":"https://api.github.com/repos/sindresorhus/refined-github/issues/145/comments"},"review_comments":{"href":"https://api.github.com/repos/sindresorhus/refined-github/pulls/145/comments"},"review_comment":{"href":"https://api.github.com/repos/sindresorhus/refined-github/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sindresorhus/refined-github/pulls/145/commits"},"statuses":{"href":"https://api.github.com/repos/sindresorhus/refined-github/statuses/0d2845ba519cf42b67a01013d13e35d1c44bde39"}}}}