{"action":"created","comment":{"url":"https://api.github.com/repos/annaul/busmall/pulls/comments/86846412","pull_request_review_id":7482151,"id":86846412,"diff_hunk":"@@ -0,0 +1,136 @@\n+'use strict';\n+\n+var productObjects = [];\n+\n+var Product = function (name, image) {\n+  this.name = name;\n+  this.image = image;\n+  this.shown = 0;\n+  this.clicked = 0;\n+  this.percentage = 0;\n+  productObjects.push(this);\n+};\n+\n+var productArray = [['Unicorn', 'img/unicorn.jpg'], ['Scissors', 'img/scissors.jpg'],\n+['Dog Duck', 'img/dog-duck.jpg'], ['Breakfast', 'img/breakfast.jpg'],\n+['Bag', 'img/bag.jpg'], ['Usb', 'img/usb.gif'],\n+['Shark', 'img/shark.jpg'], ['Dragon', 'img/dragon.jpg'],\n+['Bubble Gum', 'img/bubblegum.jpg'], ['Banana', 'img/banana.jpg'],\n+['WaterCan', 'img/water-can.jpg'], ['Sweep', 'img/sweep.png'],\n+['Pen', 'img/pen.jpg'], ['Chair', 'img/chair.jpg'],\n+['Bathroom', 'img/bathroom.jpg'], ['WineGlass', 'img/wine-glass.jpg'],\n+['Tauntaun', 'img/tauntaun.jpg'], ['PetSweep', 'img/pet-sweep.jpg'],\n+['Cthulhu', 'img/cthulhu.jpg'], ['Boots', 'img/boots.jpg']];\n+\n+for (var i = 0; i < productArray.length; i++) {\n+  var prod = new Product(productArray[i][0], productArray[i][1]);\n+};\n+\n+function getRandom(min, max) {\n+  min = 0;\n+  max = productArray.length - 1;\n+  return Math.floor(Math.random() * (max - min + 1)) + min;\n+};\n+\n+var clickable = document.getElementsByClassName('clickable');\n+\n+var prevRandom = [];\n+\n+function placeImages() {\n+  var thisRandom = [];\n+\n+  for (var i = 0; i < clickable.length; i++) {\n+    var productPlaced = getRandom();\n+\n+    while (thisRandom.indexOf(productPlaced) >= 0 || prevRandom.indexOf(productPlaced) >= 0) {\n+      productPlaced = getRandom();\n+    }\n+\n+    clickable[i].setAttribute('src', productObjects[productPlaced].image);\n+    thisRandom.push(productPlaced);\n+    productObjects[productPlaced].shown++;\n+  }\n+  prevRandom = thisRandom;\n+  console.log(prevRandom);\n+};\n+\n+placeImages();\n+\n+for (var i = 0; i < clickable.length; i++) {\n+  clickable[i].addEventListener('click', onImageClicked);\n+}\n+\n+var totalClicks = 0;\n+\n+function onImageClicked(event) {\n+  var choice = parseInt(event.target.id.substring(3));\n+\n+  productObjects[prevRandom[choice]].clicked++;\n+  console.log(choice, prevRandom);\n+  console.log('clicked', productObjects[prevRandom[choice]].name);","path":"appList.js","position":70,"original_position":70,"commit_id":"54fc3ae3676f080b614b0c80c8c7ac56fe215acb","original_commit_id":"54fc3ae3676f080b614b0c80c8c7ac56fe215acb","user":{"login":"nhuntwalker","id":5581888,"avatar_url":"https://avatars.githubusercontent.com/u/5581888?v=3","gravatar_id":"","url":"https://api.github.com/users/nhuntwalker","html_url":"https://github.com/nhuntwalker","followers_url":"https://api.github.com/users/nhuntwalker/followers","following_url":"https://api.github.com/users/nhuntwalker/following{/other_user}","gists_url":"https://api.github.com/users/nhuntwalker/gists{/gist_id}","starred_url":"https://api.github.com/users/nhuntwalker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nhuntwalker/subscriptions","organizations_url":"https://api.github.com/users/nhuntwalker/orgs","repos_url":"https://api.github.com/users/nhuntwalker/repos","events_url":"https://api.github.com/users/nhuntwalker/events{/privacy}","received_events_url":"https://api.github.com/users/nhuntwalker/received_events","type":"User","site_admin":false},"body":"unnecessary console logs","created_at":"2016-11-07T19:15:36Z","updated_at":"2016-11-07T19:15:36Z","html_url":"https://github.com/annaul/busmall/pull/4#discussion_r86846412","pull_request_url":"https://api.github.com/repos/annaul/busmall/pulls/4","_links":{"self":{"href":"https://api.github.com/repos/annaul/busmall/pulls/comments/86846412"},"html":{"href":"https://github.com/annaul/busmall/pull/4#discussion_r86846412"},"pull_request":{"href":"https://api.github.com/repos/annaul/busmall/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/annaul/busmall/pulls/4","id":92245568,"html_url":"https://github.com/annaul/busmall/pull/4","diff_url":"https://github.com/annaul/busmall/pull/4.diff","patch_url":"https://github.com/annaul/busmall/pull/4.patch","issue_url":"https://api.github.com/repos/annaul/busmall/issues/4","number":4,"state":"closed","locked":false,"title":"changed to display list","user":{"login":"annaul","id":21015160,"avatar_url":"https://avatars.githubusercontent.com/u/21015160?v=3","gravatar_id":"","url":"https://api.github.com/users/annaul","html_url":"https://github.com/annaul","followers_url":"https://api.github.com/users/annaul/followers","following_url":"https://api.github.com/users/annaul/following{/other_user}","gists_url":"https://api.github.com/users/annaul/gists{/gist_id}","starred_url":"https://api.github.com/users/annaul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annaul/subscriptions","organizations_url":"https://api.github.com/users/annaul/orgs","repos_url":"https://api.github.com/users/annaul/repos","events_url":"https://api.github.com/users/annaul/events{/privacy}","received_events_url":"https://api.github.com/users/annaul/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-11-03T21:38:46Z","updated_at":"2016-11-07T19:15:43Z","closed_at":"2016-11-03T21:38:51Z","merged_at":null,"merge_commit_sha":"a65f2144f4c904b3d4eb18d152a674e59c7474fc","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/annaul/busmall/pulls/4/commits","review_comments_url":"https://api.github.com/repos/annaul/busmall/pulls/4/comments","review_comment_url":"https://api.github.com/repos/annaul/busmall/pulls/comments{/number}","comments_url":"https://api.github.com/repos/annaul/busmall/issues/4/comments","statuses_url":"https://api.github.com/repos/annaul/busmall/statuses/54fc3ae3676f080b614b0c80c8c7ac56fe215acb","head":{"label":"annaul:busmall-list","ref":"busmall-list","sha":"54fc3ae3676f080b614b0c80c8c7ac56fe215acb","user":{"login":"annaul","id":21015160,"avatar_url":"https://avatars.githubusercontent.com/u/21015160?v=3","gravatar_id":"","url":"https://api.github.com/users/annaul","html_url":"https://github.com/annaul","followers_url":"https://api.github.com/users/annaul/followers","following_url":"https://api.github.com/users/annaul/following{/other_user}","gists_url":"https://api.github.com/users/annaul/gists{/gist_id}","starred_url":"https://api.github.com/users/annaul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annaul/subscriptions","organizations_url":"https://api.github.com/users/annaul/orgs","repos_url":"https://api.github.com/users/annaul/repos","events_url":"https://api.github.com/users/annaul/events{/privacy}","received_events_url":"https://api.github.com/users/annaul/received_events","type":"User","site_admin":false},"repo":{"id":72470573,"name":"busmall","full_name":"annaul/busmall","owner":{"login":"annaul","id":21015160,"avatar_url":"https://avatars.githubusercontent.com/u/21015160?v=3","gravatar_id":"","url":"https://api.github.com/users/annaul","html_url":"https://github.com/annaul","followers_url":"https://api.github.com/users/annaul/followers","following_url":"https://api.github.com/users/annaul/following{/other_user}","gists_url":"https://api.github.com/users/annaul/gists{/gist_id}","starred_url":"https://api.github.com/users/annaul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annaul/subscriptions","organizations_url":"https://api.github.com/users/annaul/orgs","repos_url":"https://api.github.com/users/annaul/repos","events_url":"https://api.github.com/users/annaul/events{/privacy}","received_events_url":"https://api.github.com/users/annaul/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/annaul/busmall","description":null,"fork":false,"url":"https://api.github.com/repos/annaul/busmall","forks_url":"https://api.github.com/repos/annaul/busmall/forks","keys_url":"https://api.github.com/repos/annaul/busmall/keys{/key_id}","collaborators_url":"https://api.github.com/repos/annaul/busmall/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/annaul/busmall/teams","hooks_url":"https://api.github.com/repos/annaul/busmall/hooks","issue_events_url":"https://api.github.com/repos/annaul/busmall/issues/events{/number}","events_url":"https://api.github.com/repos/annaul/busmall/events","assignees_url":"https://api.github.com/repos/annaul/busmall/assignees{/user}","branches_url":"https://api.github.com/repos/annaul/busmall/branches{/branch}","tags_url":"https://api.github.com/repos/annaul/busmall/tags","blobs_url":"https://api.github.com/repos/annaul/busmall/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/annaul/busmall/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/annaul/busmall/git/refs{/sha}","trees_url":"https://api.github.com/repos/annaul/busmall/git/trees{/sha}","statuses_url":"https://api.github.com/repos/annaul/busmall/statuses/{sha}","languages_url":"https://api.github.com/repos/annaul/busmall/languages","stargazers_url":"https://api.github.com/repos/annaul/busmall/stargazers","contributors_url":"https://api.github.com/repos/annaul/busmall/contributors","subscribers_url":"https://api.github.com/repos/annaul/busmall/subscribers","subscription_url":"https://api.github.com/repos/annaul/busmall/subscription","commits_url":"https://api.github.com/repos/annaul/busmall/commits{/sha}","git_commits_url":"https://api.github.com/repos/annaul/busmall/git/commits{/sha}","comments_url":"https://api.github.com/repos/annaul/busmall/comments{/number}","issue_comment_url":"https://api.github.com/repos/annaul/busmall/issues/comments{/number}","contents_url":"https://api.github.com/repos/annaul/busmall/contents/{+path}","compare_url":"https://api.github.com/repos/annaul/busmall/compare/{base}...{head}","merges_url":"https://api.github.com/repos/annaul/busmall/merges","archive_url":"https://api.github.com/repos/annaul/busmall/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/annaul/busmall/downloads","issues_url":"https://api.github.com/repos/annaul/busmall/issues{/number}","pulls_url":"https://api.github.com/repos/annaul/busmall/pulls{/number}","milestones_url":"https://api.github.com/repos/annaul/busmall/milestones{/number}","notifications_url":"https://api.github.com/repos/annaul/busmall/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/annaul/busmall/labels{/name}","releases_url":"https://api.github.com/repos/annaul/busmall/releases{/id}","deployments_url":"https://api.github.com/repos/annaul/busmall/deployments","created_at":"2016-10-31T19:25:25Z","updated_at":"2016-11-01T00:52:52Z","pushed_at":"2016-11-06T03:04:42Z","git_url":"git://github.com/annaul/busmall.git","ssh_url":"git@github.com:annaul/busmall.git","clone_url":"https://github.com/annaul/busmall.git","svn_url":"https://github.com/annaul/busmall","homepage":null,"size":1965,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"annaul:master","ref":"master","sha":"10570abe8d7b983f02b5ab1a6a189a5d379ecc25","user":{"login":"annaul","id":21015160,"avatar_url":"https://avatars.githubusercontent.com/u/21015160?v=3","gravatar_id":"","url":"https://api.github.com/users/annaul","html_url":"https://github.com/annaul","followers_url":"https://api.github.com/users/annaul/followers","following_url":"https://api.github.com/users/annaul/following{/other_user}","gists_url":"https://api.github.com/users/annaul/gists{/gist_id}","starred_url":"https://api.github.com/users/annaul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annaul/subscriptions","organizations_url":"https://api.github.com/users/annaul/orgs","repos_url":"https://api.github.com/users/annaul/repos","events_url":"https://api.github.com/users/annaul/events{/privacy}","received_events_url":"https://api.github.com/users/annaul/received_events","type":"User","site_admin":false},"repo":{"id":72470573,"name":"busmall","full_name":"annaul/busmall","owner":{"login":"annaul","id":21015160,"avatar_url":"https://avatars.githubusercontent.com/u/21015160?v=3","gravatar_id":"","url":"https://api.github.com/users/annaul","html_url":"https://github.com/annaul","followers_url":"https://api.github.com/users/annaul/followers","following_url":"https://api.github.com/users/annaul/following{/other_user}","gists_url":"https://api.github.com/users/annaul/gists{/gist_id}","starred_url":"https://api.github.com/users/annaul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/annaul/subscriptions","organizations_url":"https://api.github.com/users/annaul/orgs","repos_url":"https://api.github.com/users/annaul/repos","events_url":"https://api.github.com/users/annaul/events{/privacy}","received_events_url":"https://api.github.com/users/annaul/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/annaul/busmall","description":null,"fork":false,"url":"https://api.github.com/repos/annaul/busmall","forks_url":"https://api.github.com/repos/annaul/busmall/forks","keys_url":"https://api.github.com/repos/annaul/busmall/keys{/key_id}","collaborators_url":"https://api.github.com/repos/annaul/busmall/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/annaul/busmall/teams","hooks_url":"https://api.github.com/repos/annaul/busmall/hooks","issue_events_url":"https://api.github.com/repos/annaul/busmall/issues/events{/number}","events_url":"https://api.github.com/repos/annaul/busmall/events","assignees_url":"https://api.github.com/repos/annaul/busmall/assignees{/user}","branches_url":"https://api.github.com/repos/annaul/busmall/branches{/branch}","tags_url":"https://api.github.com/repos/annaul/busmall/tags","blobs_url":"https://api.github.com/repos/annaul/busmall/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/annaul/busmall/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/annaul/busmall/git/refs{/sha}","trees_url":"https://api.github.com/repos/annaul/busmall/git/trees{/sha}","statuses_url":"https://api.github.com/repos/annaul/busmall/statuses/{sha}","languages_url":"https://api.github.com/repos/annaul/busmall/languages","stargazers_url":"https://api.github.com/repos/annaul/busmall/stargazers","contributors_url":"https://api.github.com/repos/annaul/busmall/contributors","subscribers_url":"https://api.github.com/repos/annaul/busmall/subscribers","subscription_url":"https://api.github.com/repos/annaul/busmall/subscription","commits_url":"https://api.github.com/repos/annaul/busmall/commits{/sha}","git_commits_url":"https://api.github.com/repos/annaul/busmall/git/commits{/sha}","comments_url":"https://api.github.com/repos/annaul/busmall/comments{/number}","issue_comment_url":"https://api.github.com/repos/annaul/busmall/issues/comments{/number}","contents_url":"https://api.github.com/repos/annaul/busmall/contents/{+path}","compare_url":"https://api.github.com/repos/annaul/busmall/compare/{base}...{head}","merges_url":"https://api.github.com/repos/annaul/busmall/merges","archive_url":"https://api.github.com/repos/annaul/busmall/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/annaul/busmall/downloads","issues_url":"https://api.github.com/repos/annaul/busmall/issues{/number}","pulls_url":"https://api.github.com/repos/annaul/busmall/pulls{/number}","milestones_url":"https://api.github.com/repos/annaul/busmall/milestones{/number}","notifications_url":"https://api.github.com/repos/annaul/busmall/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/annaul/busmall/labels{/name}","releases_url":"https://api.github.com/repos/annaul/busmall/releases{/id}","deployments_url":"https://api.github.com/repos/annaul/busmall/deployments","created_at":"2016-10-31T19:25:25Z","updated_at":"2016-11-01T00:52:52Z","pushed_at":"2016-11-06T03:04:42Z","git_url":"git://github.com/annaul/busmall.git","ssh_url":"git@github.com:annaul/busmall.git","clone_url":"https://github.com/annaul/busmall.git","svn_url":"https://github.com/annaul/busmall","homepage":null,"size":1965,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/annaul/busmall/pulls/4"},"html":{"href":"https://github.com/annaul/busmall/pull/4"},"issue":{"href":"https://api.github.com/repos/annaul/busmall/issues/4"},"comments":{"href":"https://api.github.com/repos/annaul/busmall/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/annaul/busmall/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/annaul/busmall/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/annaul/busmall/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/annaul/busmall/statuses/54fc3ae3676f080b614b0c80c8c7ac56fe215acb"}}}}
{"actor":{"display_login":"nhuntwalker"}}