{"action":"created","comment":{"url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/pulls/comments/204692148","pull_request_review_id":139812436,"id":204692148,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNDY5MjE0OA==","diff_hunk":"@@ -0,0 +1,91 @@\n+\n+const resetButton = document.querySelector('button[data-behaviour=\"reset\"]');\n+const sizeButton = document.querySelector('button[data-behaviour=\"size\"]');\n+const rainbowButton = document.querySelector('button[data-behaviour=\"rainbow\"]');\n+const blackButton = document.querySelector('button[data-behaviour=\"black\"]');\n+const gameContainer = document.querySelector('.gameContainer');\n+let isRainbowPen = false\n+sizeButton.addEventListener('click', () => {\n+  makeGrid()\n+});\n+\n+rainbowButton.addEventListener('click', () => {\n+  isRainbowPen = true\n+});\n+\n+blackButton.addEventListener('click', () => {\n+  isRainbowPen = false\n+});\n+\n+\n+\n+//Create Grid\n+function grid(size) {\n+  for(let i = 1; i <= (size * size); i++) {\n+    let gridCell = document.createElement('div');\n+    gridCell.classList.add('grid');\n+    gameContainer.appendChild(gridCell);\n+    document.querySelectorAll('grid');\n+    gridCell.addEventListener('mouseover', () => colorGridCell(gridCell));\n+    gridCell.addEventListener('click', () => gridCell.classList.remove('paint'));\n+  }\n+}\n+grid(16);\n+\n+//Resets the game and prompts the user for a numerical input for the size of the new grid.\n+function makeGrid() {\n+  let gridSize = prompt('How many squares would you like on each axis of the new grid?', 16, )\n+  document.body.style.setProperty('--gridSize', gridSize)\n+  let elementRemove = document.getElementsByClassName('grid')\n+  while (elementRemove[0]) {","path":"script.js","position":40,"original_position":40,"commit_id":"f39c588b25b3d7d8e438d1f09684497ad7e08087","original_commit_id":"f39c588b25b3d7d8e438d1f09684497ad7e08087","user":{"login":"krisquigley","id":5502215,"node_id":"MDQ6VXNlcjU1MDIyMTU=","avatar_url":"https://avatars0.githubusercontent.com/u/5502215?v=4","gravatar_id":"","url":"https://api.github.com/users/krisquigley","html_url":"https://github.com/krisquigley","followers_url":"https://api.github.com/users/krisquigley/followers","following_url":"https://api.github.com/users/krisquigley/following{/other_user}","gists_url":"https://api.github.com/users/krisquigley/gists{/gist_id}","starred_url":"https://api.github.com/users/krisquigley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krisquigley/subscriptions","organizations_url":"https://api.github.com/users/krisquigley/orgs","repos_url":"https://api.github.com/users/krisquigley/repos","events_url":"https://api.github.com/users/krisquigley/events{/privacy}","received_events_url":"https://api.github.com/users/krisquigley/received_events","type":"User","site_admin":false},"body":"Can you find a more performant way of doing this? Loops will always be more expensive and only used when necessary","created_at":"2018-07-24T09:50:13Z","updated_at":"2018-07-24T09:55:12Z","html_url":"https://github.com/affinity-digital-ltd/etch-a-sketch/pull/2#discussion_r204692148","pull_request_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/pulls/2","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/pulls/comments/204692148"},"html":{"href":"https://github.com/affinity-digital-ltd/etch-a-sketch/pull/2#discussion_r204692148"},"pull_request":{"href":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/pulls/2","id":203468382,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzNDY4Mzgy","html_url":"https://github.com/affinity-digital-ltd/etch-a-sketch/pull/2","diff_url":"https://github.com/affinity-digital-ltd/etch-a-sketch/pull/2.diff","patch_url":"https://github.com/affinity-digital-ltd/etch-a-sketch/pull/2.patch","issue_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/issues/2","number":2,"state":"open","locked":false,"title":"Develop","user":{"login":"jonathonpday","id":36718060,"node_id":"MDQ6VXNlcjM2NzE4MDYw","avatar_url":"https://avatars1.githubusercontent.com/u/36718060?v=4","gravatar_id":"","url":"https://api.github.com/users/jonathonpday","html_url":"https://github.com/jonathonpday","followers_url":"https://api.github.com/users/jonathonpday/followers","following_url":"https://api.github.com/users/jonathonpday/following{/other_user}","gists_url":"https://api.github.com/users/jonathonpday/gists{/gist_id}","starred_url":"https://api.github.com/users/jonathonpday/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonathonpday/subscriptions","organizations_url":"https://api.github.com/users/jonathonpday/orgs","repos_url":"https://api.github.com/users/jonathonpday/repos","events_url":"https://api.github.com/users/jonathonpday/events{/privacy}","received_events_url":"https://api.github.com/users/jonathonpday/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-24T09:44:32Z","updated_at":"2018-07-24T09:55:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"41e167f55d9e6424f864c930ef2059d64246452d","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/pulls/2/commits","review_comments_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/pulls/2/comments","review_comment_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/issues/2/comments","statuses_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/statuses/f39c588b25b3d7d8e438d1f09684497ad7e08087","head":{"label":"affinity-digital-ltd:develop","ref":"develop","sha":"f39c588b25b3d7d8e438d1f09684497ad7e08087","user":{"login":"affinity-digital-ltd","id":26115534,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2MTE1NTM0","avatar_url":"https://avatars0.githubusercontent.com/u/26115534?v=4","gravatar_id":"","url":"https://api.github.com/users/affinity-digital-ltd","html_url":"https://github.com/affinity-digital-ltd","followers_url":"https://api.github.com/users/affinity-digital-ltd/followers","following_url":"https://api.github.com/users/affinity-digital-ltd/following{/other_user}","gists_url":"https://api.github.com/users/affinity-digital-ltd/gists{/gist_id}","starred_url":"https://api.github.com/users/affinity-digital-ltd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/affinity-digital-ltd/subscriptions","organizations_url":"https://api.github.com/users/affinity-digital-ltd/orgs","repos_url":"https://api.github.com/users/affinity-digital-ltd/repos","events_url":"https://api.github.com/users/affinity-digital-ltd/events{/privacy}","received_events_url":"https://api.github.com/users/affinity-digital-ltd/received_events","type":"Organization","site_admin":false},"repo":{"id":136499116,"node_id":"MDEwOlJlcG9zaXRvcnkxMzY0OTkxMTY=","name":"etch-a-sketch","full_name":"affinity-digital-ltd/etch-a-sketch","owner":{"login":"affinity-digital-ltd","id":26115534,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2MTE1NTM0","avatar_url":"https://avatars0.githubusercontent.com/u/26115534?v=4","gravatar_id":"","url":"https://api.github.com/users/affinity-digital-ltd","html_url":"https://github.com/affinity-digital-ltd","followers_url":"https://api.github.com/users/affinity-digital-ltd/followers","following_url":"https://api.github.com/users/affinity-digital-ltd/following{/other_user}","gists_url":"https://api.github.com/users/affinity-digital-ltd/gists{/gist_id}","starred_url":"https://api.github.com/users/affinity-digital-ltd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/affinity-digital-ltd/subscriptions","organizations_url":"https://api.github.com/users/affinity-digital-ltd/orgs","repos_url":"https://api.github.com/users/affinity-digital-ltd/repos","events_url":"https://api.github.com/users/affinity-digital-ltd/events{/privacy}","received_events_url":"https://api.github.com/users/affinity-digital-ltd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/affinity-digital-ltd/etch-a-sketch","description":"Odin project - DOM manipulation etch-a-sketch project","fork":false,"url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch","forks_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/forks","keys_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/teams","hooks_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/hooks","issue_events_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/issues/events{/number}","events_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/events","assignees_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/assignees{/user}","branches_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/branches{/branch}","tags_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/tags","blobs_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/git/refs{/sha}","trees_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/statuses/{sha}","languages_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/languages","stargazers_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/stargazers","contributors_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/contributors","subscribers_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/subscribers","subscription_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/subscription","commits_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/commits{/sha}","git_commits_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/git/commits{/sha}","comments_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/comments{/number}","issue_comment_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/issues/comments{/number}","contents_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/contents/{+path}","compare_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/merges","archive_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/downloads","issues_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/issues{/number}","pulls_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/pulls{/number}","milestones_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/milestones{/number}","notifications_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/labels{/name}","releases_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/releases{/id}","deployments_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/deployments","created_at":"2018-06-07T15:45:50Z","updated_at":"2018-06-07T15:45:53Z","pushed_at":"2018-07-24T09:44:33Z","git_url":"git://github.com/affinity-digital-ltd/etch-a-sketch.git","ssh_url":"git@github.com:affinity-digital-ltd/etch-a-sketch.git","clone_url":"https://github.com/affinity-digital-ltd/etch-a-sketch.git","svn_url":"https://github.com/affinity-digital-ltd/etch-a-sketch","homepage":null,"size":278,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"affinity-digital-ltd:master","ref":"master","sha":"4915cf6356f7558563577effe37ab198eb22aa8f","user":{"login":"affinity-digital-ltd","id":26115534,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2MTE1NTM0","avatar_url":"https://avatars0.githubusercontent.com/u/26115534?v=4","gravatar_id":"","url":"https://api.github.com/users/affinity-digital-ltd","html_url":"https://github.com/affinity-digital-ltd","followers_url":"https://api.github.com/users/affinity-digital-ltd/followers","following_url":"https://api.github.com/users/affinity-digital-ltd/following{/other_user}","gists_url":"https://api.github.com/users/affinity-digital-ltd/gists{/gist_id}","starred_url":"https://api.github.com/users/affinity-digital-ltd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/affinity-digital-ltd/subscriptions","organizations_url":"https://api.github.com/users/affinity-digital-ltd/orgs","repos_url":"https://api.github.com/users/affinity-digital-ltd/repos","events_url":"https://api.github.com/users/affinity-digital-ltd/events{/privacy}","received_events_url":"https://api.github.com/users/affinity-digital-ltd/received_events","type":"Organization","site_admin":false},"repo":{"id":136499116,"node_id":"MDEwOlJlcG9zaXRvcnkxMzY0OTkxMTY=","name":"etch-a-sketch","full_name":"affinity-digital-ltd/etch-a-sketch","owner":{"login":"affinity-digital-ltd","id":26115534,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI2MTE1NTM0","avatar_url":"https://avatars0.githubusercontent.com/u/26115534?v=4","gravatar_id":"","url":"https://api.github.com/users/affinity-digital-ltd","html_url":"https://github.com/affinity-digital-ltd","followers_url":"https://api.github.com/users/affinity-digital-ltd/followers","following_url":"https://api.github.com/users/affinity-digital-ltd/following{/other_user}","gists_url":"https://api.github.com/users/affinity-digital-ltd/gists{/gist_id}","starred_url":"https://api.github.com/users/affinity-digital-ltd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/affinity-digital-ltd/subscriptions","organizations_url":"https://api.github.com/users/affinity-digital-ltd/orgs","repos_url":"https://api.github.com/users/affinity-digital-ltd/repos","events_url":"https://api.github.com/users/affinity-digital-ltd/events{/privacy}","received_events_url":"https://api.github.com/users/affinity-digital-ltd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/affinity-digital-ltd/etch-a-sketch","description":"Odin project - DOM manipulation etch-a-sketch project","fork":false,"url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch","forks_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/forks","keys_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/teams","hooks_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/hooks","issue_events_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/issues/events{/number}","events_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/events","assignees_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/assignees{/user}","branches_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/branches{/branch}","tags_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/tags","blobs_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/git/refs{/sha}","trees_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/statuses/{sha}","languages_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/languages","stargazers_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/stargazers","contributors_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/contributors","subscribers_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/subscribers","subscription_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/subscription","commits_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/commits{/sha}","git_commits_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/git/commits{/sha}","comments_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/comments{/number}","issue_comment_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/issues/comments{/number}","contents_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/contents/{+path}","compare_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/merges","archive_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/downloads","issues_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/issues{/number}","pulls_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/pulls{/number}","milestones_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/milestones{/number}","notifications_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/labels{/name}","releases_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/releases{/id}","deployments_url":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/deployments","created_at":"2018-06-07T15:45:50Z","updated_at":"2018-06-07T15:45:53Z","pushed_at":"2018-07-24T09:44:33Z","git_url":"git://github.com/affinity-digital-ltd/etch-a-sketch.git","ssh_url":"git@github.com:affinity-digital-ltd/etch-a-sketch.git","clone_url":"https://github.com/affinity-digital-ltd/etch-a-sketch.git","svn_url":"https://github.com/affinity-digital-ltd/etch-a-sketch","homepage":null,"size":278,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/pulls/2"},"html":{"href":"https://github.com/affinity-digital-ltd/etch-a-sketch/pull/2"},"issue":{"href":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/issues/2"},"comments":{"href":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/affinity-digital-ltd/etch-a-sketch/statuses/f39c588b25b3d7d8e438d1f09684497ad7e08087"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"krisquigley"}}