{"action":"created","comment":{"url":"https://api.github.com/repos/ga-dc/pixart_js/pulls/comments/43253510","id":43253510,"diff_hunk":"@@ -1 +1,41 @@\n+var swatchArray = []\n \n+for (i=0;i<8000;i++) {\n+  var child = $(\"<div/>\",{\"class\":\"square\"});\n+  $(\"body\").append(child);\n+}\n+\n+for (i=0;i<3;i++){\n+  var swatchChild = $(\"<div/>\",{\"class\":\"brush\"});\n+  $(\".controls\").append(swatchChild);\n+}\n+\n+var setColor = function(evt){\n+  evt.preventDefault();\n+  var startColor = $(\".brush\").eq(0).css(\"background-color\")\n+  var colorSelect = $(\":text\").val();\n+  $(\".brush\").eq(0).css(\"background-color\", colorSelect);\n+  var newColor = $(\".brush\").eq(0).css(\"background-color\")\n+  if(startColor != newColor){\n+    swatchArray.unshift(colorSelect)\n+    for(i=1;i<4;i++){\n+      $(\".brush\").eq(i).css(\"background-color\",swatchArray[i])\n+    }\n+  }\n+}\n+\n+var setSquareColor = function(){\n+  paintColor = $(\".brush\").css(\"background-color\")","path":"pixart.js","position":28,"original_position":28,"commit_id":"923b8c89b7d70452785492e111f92f9a7ec95db1","original_commit_id":"923b8c89b7d70452785492e111f92f9a7ec95db1","user":{"login":"jshawl","id":3824954,"avatar_url":"https://avatars.githubusercontent.com/u/3824954?v=3","gravatar_id":"","url":"https://api.github.com/users/jshawl","html_url":"https://github.com/jshawl","followers_url":"https://api.github.com/users/jshawl/followers","following_url":"https://api.github.com/users/jshawl/following{/other_user}","gists_url":"https://api.github.com/users/jshawl/gists{/gist_id}","starred_url":"https://api.github.com/users/jshawl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jshawl/subscriptions","organizations_url":"https://api.github.com/users/jshawl/orgs","repos_url":"https://api.github.com/users/jshawl/repos","events_url":"https://api.github.com/users/jshawl/events{/privacy}","received_events_url":"https://api.github.com/users/jshawl/received_events","type":"User","site_admin":false},"body":"try to avoid globals","created_at":"2015-10-28T13:21:18Z","updated_at":"2015-10-28T13:21:18Z","html_url":"https://github.com/ga-dc/pixart_js/pull/92#discussion_r43253510","pull_request_url":"https://api.github.com/repos/ga-dc/pixart_js/pulls/92","_links":{"self":{"href":"https://api.github.com/repos/ga-dc/pixart_js/pulls/comments/43253510"},"html":{"href":"https://github.com/ga-dc/pixart_js/pull/92#discussion_r43253510"},"pull_request":{"href":"https://api.github.com/repos/ga-dc/pixart_js/pulls/92"}}},"pull_request":{"url":"https://api.github.com/repos/ga-dc/pixart_js/pulls/92","id":48370257,"html_url":"https://github.com/ga-dc/pixart_js/pull/92","diff_url":"https://github.com/ga-dc/pixart_js/pull/92.diff","patch_url":"https://github.com/ga-dc/pixart_js/pull/92.patch","issue_url":"https://api.github.com/repos/ga-dc/pixart_js/issues/92","number":92,"state":"open","locked":false,"title":"Davis solution","user":{"login":"Mahartney","id":13815044,"avatar_url":"https://avatars.githubusercontent.com/u/13815044?v=3","gravatar_id":"","url":"https://api.github.com/users/Mahartney","html_url":"https://github.com/Mahartney","followers_url":"https://api.github.com/users/Mahartney/followers","following_url":"https://api.github.com/users/Mahartney/following{/other_user}","gists_url":"https://api.github.com/users/Mahartney/gists{/gist_id}","starred_url":"https://api.github.com/users/Mahartney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mahartney/subscriptions","organizations_url":"https://api.github.com/users/Mahartney/orgs","repos_url":"https://api.github.com/users/Mahartney/repos","events_url":"https://api.github.com/users/Mahartney/events{/privacy}","received_events_url":"https://api.github.com/users/Mahartney/received_events","type":"User","site_admin":false},"body":"comfort 3/5\r\ncompletion 4/5\r\n\r\nPixart Homework, let me know if commit/pull process is different than what is expected.","created_at":"2015-10-21T18:37:45Z","updated_at":"2015-10-28T13:21:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"102892cb35407584b81adc348626f01af52fc14a","assignee":{"login":"jshawl","id":3824954,"avatar_url":"https://avatars.githubusercontent.com/u/3824954?v=3","gravatar_id":"","url":"https://api.github.com/users/jshawl","html_url":"https://github.com/jshawl","followers_url":"https://api.github.com/users/jshawl/followers","following_url":"https://api.github.com/users/jshawl/following{/other_user}","gists_url":"https://api.github.com/users/jshawl/gists{/gist_id}","starred_url":"https://api.github.com/users/jshawl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jshawl/subscriptions","organizations_url":"https://api.github.com/users/jshawl/orgs","repos_url":"https://api.github.com/users/jshawl/repos","events_url":"https://api.github.com/users/jshawl/events{/privacy}","received_events_url":"https://api.github.com/users/jshawl/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/ga-dc/pixart_js/pulls/92/commits","review_comments_url":"https://api.github.com/repos/ga-dc/pixart_js/pulls/92/comments","review_comment_url":"https://api.github.com/repos/ga-dc/pixart_js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ga-dc/pixart_js/issues/92/comments","statuses_url":"https://api.github.com/repos/ga-dc/pixart_js/statuses/923b8c89b7d70452785492e111f92f9a7ec95db1","head":{"label":"Mahartney:Davis-solution","ref":"Davis-solution","sha":"923b8c89b7d70452785492e111f92f9a7ec95db1","user":{"login":"Mahartney","id":13815044,"avatar_url":"https://avatars.githubusercontent.com/u/13815044?v=3","gravatar_id":"","url":"https://api.github.com/users/Mahartney","html_url":"https://github.com/Mahartney","followers_url":"https://api.github.com/users/Mahartney/followers","following_url":"https://api.github.com/users/Mahartney/following{/other_user}","gists_url":"https://api.github.com/users/Mahartney/gists{/gist_id}","starred_url":"https://api.github.com/users/Mahartney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mahartney/subscriptions","organizations_url":"https://api.github.com/users/Mahartney/orgs","repos_url":"https://api.github.com/users/Mahartney/repos","events_url":"https://api.github.com/users/Mahartney/events{/privacy}","received_events_url":"https://api.github.com/users/Mahartney/received_events","type":"User","site_admin":false},"repo":{"id":44686586,"name":"pixart_js","full_name":"Mahartney/pixart_js","owner":{"login":"Mahartney","id":13815044,"avatar_url":"https://avatars.githubusercontent.com/u/13815044?v=3","gravatar_id":"","url":"https://api.github.com/users/Mahartney","html_url":"https://github.com/Mahartney","followers_url":"https://api.github.com/users/Mahartney/followers","following_url":"https://api.github.com/users/Mahartney/following{/other_user}","gists_url":"https://api.github.com/users/Mahartney/gists{/gist_id}","starred_url":"https://api.github.com/users/Mahartney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mahartney/subscriptions","organizations_url":"https://api.github.com/users/Mahartney/orgs","repos_url":"https://api.github.com/users/Mahartney/repos","events_url":"https://api.github.com/users/Mahartney/events{/privacy}","received_events_url":"https://api.github.com/users/Mahartney/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Mahartney/pixart_js","description":"Use JS events and programmatically generated DOM elements to build a drawing application. [javascript, dom]","fork":true,"url":"https://api.github.com/repos/Mahartney/pixart_js","forks_url":"https://api.github.com/repos/Mahartney/pixart_js/forks","keys_url":"https://api.github.com/repos/Mahartney/pixart_js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Mahartney/pixart_js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Mahartney/pixart_js/teams","hooks_url":"https://api.github.com/repos/Mahartney/pixart_js/hooks","issue_events_url":"https://api.github.com/repos/Mahartney/pixart_js/issues/events{/number}","events_url":"https://api.github.com/repos/Mahartney/pixart_js/events","assignees_url":"https://api.github.com/repos/Mahartney/pixart_js/assignees{/user}","branches_url":"https://api.github.com/repos/Mahartney/pixart_js/branches{/branch}","tags_url":"https://api.github.com/repos/Mahartney/pixart_js/tags","blobs_url":"https://api.github.com/repos/Mahartney/pixart_js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Mahartney/pixart_js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Mahartney/pixart_js/git/refs{/sha}","trees_url":"https://api.github.com/repos/Mahartney/pixart_js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Mahartney/pixart_js/statuses/{sha}","languages_url":"https://api.github.com/repos/Mahartney/pixart_js/languages","stargazers_url":"https://api.github.com/repos/Mahartney/pixart_js/stargazers","contributors_url":"https://api.github.com/repos/Mahartney/pixart_js/contributors","subscribers_url":"https://api.github.com/repos/Mahartney/pixart_js/subscribers","subscription_url":"https://api.github.com/repos/Mahartney/pixart_js/subscription","commits_url":"https://api.github.com/repos/Mahartney/pixart_js/commits{/sha}","git_commits_url":"https://api.github.com/repos/Mahartney/pixart_js/git/commits{/sha}","comments_url":"https://api.github.com/repos/Mahartney/pixart_js/comments{/number}","issue_comment_url":"https://api.github.com/repos/Mahartney/pixart_js/issues/comments{/number}","contents_url":"https://api.github.com/repos/Mahartney/pixart_js/contents/{+path}","compare_url":"https://api.github.com/repos/Mahartney/pixart_js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Mahartney/pixart_js/merges","archive_url":"https://api.github.com/repos/Mahartney/pixart_js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Mahartney/pixart_js/downloads","issues_url":"https://api.github.com/repos/Mahartney/pixart_js/issues{/number}","pulls_url":"https://api.github.com/repos/Mahartney/pixart_js/pulls{/number}","milestones_url":"https://api.github.com/repos/Mahartney/pixart_js/milestones{/number}","notifications_url":"https://api.github.com/repos/Mahartney/pixart_js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Mahartney/pixart_js/labels{/name}","releases_url":"https://api.github.com/repos/Mahartney/pixart_js/releases{/id}","created_at":"2015-10-21T15:39:35Z","updated_at":"2015-10-21T15:39:36Z","pushed_at":"2015-10-21T20:42:43Z","git_url":"git://github.com/Mahartney/pixart_js.git","ssh_url":"git@github.com:Mahartney/pixart_js.git","clone_url":"https://github.com/Mahartney/pixart_js.git","svn_url":"https://github.com/Mahartney/pixart_js","homepage":"","size":91,"stargazers_count":0,"watchers_count":0,"language":"HTML","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":"ga-dc:master","ref":"master","sha":"2f481206df5f6ef20010c2b2cd4789bf503fc75e","user":{"login":"ga-dc","id":10747017,"avatar_url":"https://avatars.githubusercontent.com/u/10747017?v=3","gravatar_id":"","url":"https://api.github.com/users/ga-dc","html_url":"https://github.com/ga-dc","followers_url":"https://api.github.com/users/ga-dc/followers","following_url":"https://api.github.com/users/ga-dc/following{/other_user}","gists_url":"https://api.github.com/users/ga-dc/gists{/gist_id}","starred_url":"https://api.github.com/users/ga-dc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga-dc/subscriptions","organizations_url":"https://api.github.com/users/ga-dc/orgs","repos_url":"https://api.github.com/users/ga-dc/repos","events_url":"https://api.github.com/users/ga-dc/events{/privacy}","received_events_url":"https://api.github.com/users/ga-dc/received_events","type":"Organization","site_admin":false},"repo":{"id":34754821,"name":"pixart_js","full_name":"ga-dc/pixart_js","owner":{"login":"ga-dc","id":10747017,"avatar_url":"https://avatars.githubusercontent.com/u/10747017?v=3","gravatar_id":"","url":"https://api.github.com/users/ga-dc","html_url":"https://github.com/ga-dc","followers_url":"https://api.github.com/users/ga-dc/followers","following_url":"https://api.github.com/users/ga-dc/following{/other_user}","gists_url":"https://api.github.com/users/ga-dc/gists{/gist_id}","starred_url":"https://api.github.com/users/ga-dc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ga-dc/subscriptions","organizations_url":"https://api.github.com/users/ga-dc/orgs","repos_url":"https://api.github.com/users/ga-dc/repos","events_url":"https://api.github.com/users/ga-dc/events{/privacy}","received_events_url":"https://api.github.com/users/ga-dc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ga-dc/pixart_js","description":"Use JS events and programmatically generated DOM elements to build a drawing application. [javascript, dom]","fork":false,"url":"https://api.github.com/repos/ga-dc/pixart_js","forks_url":"https://api.github.com/repos/ga-dc/pixart_js/forks","keys_url":"https://api.github.com/repos/ga-dc/pixart_js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ga-dc/pixart_js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ga-dc/pixart_js/teams","hooks_url":"https://api.github.com/repos/ga-dc/pixart_js/hooks","issue_events_url":"https://api.github.com/repos/ga-dc/pixart_js/issues/events{/number}","events_url":"https://api.github.com/repos/ga-dc/pixart_js/events","assignees_url":"https://api.github.com/repos/ga-dc/pixart_js/assignees{/user}","branches_url":"https://api.github.com/repos/ga-dc/pixart_js/branches{/branch}","tags_url":"https://api.github.com/repos/ga-dc/pixart_js/tags","blobs_url":"https://api.github.com/repos/ga-dc/pixart_js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ga-dc/pixart_js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ga-dc/pixart_js/git/refs{/sha}","trees_url":"https://api.github.com/repos/ga-dc/pixart_js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ga-dc/pixart_js/statuses/{sha}","languages_url":"https://api.github.com/repos/ga-dc/pixart_js/languages","stargazers_url":"https://api.github.com/repos/ga-dc/pixart_js/stargazers","contributors_url":"https://api.github.com/repos/ga-dc/pixart_js/contributors","subscribers_url":"https://api.github.com/repos/ga-dc/pixart_js/subscribers","subscription_url":"https://api.github.com/repos/ga-dc/pixart_js/subscription","commits_url":"https://api.github.com/repos/ga-dc/pixart_js/commits{/sha}","git_commits_url":"https://api.github.com/repos/ga-dc/pixart_js/git/commits{/sha}","comments_url":"https://api.github.com/repos/ga-dc/pixart_js/comments{/number}","issue_comment_url":"https://api.github.com/repos/ga-dc/pixart_js/issues/comments{/number}","contents_url":"https://api.github.com/repos/ga-dc/pixart_js/contents/{+path}","compare_url":"https://api.github.com/repos/ga-dc/pixart_js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ga-dc/pixart_js/merges","archive_url":"https://api.github.com/repos/ga-dc/pixart_js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ga-dc/pixart_js/downloads","issues_url":"https://api.github.com/repos/ga-dc/pixart_js/issues{/number}","pulls_url":"https://api.github.com/repos/ga-dc/pixart_js/pulls{/number}","milestones_url":"https://api.github.com/repos/ga-dc/pixart_js/milestones{/number}","notifications_url":"https://api.github.com/repos/ga-dc/pixart_js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ga-dc/pixart_js/labels{/name}","releases_url":"https://api.github.com/repos/ga-dc/pixart_js/releases{/id}","created_at":"2015-04-28T20:41:44Z","updated_at":"2015-07-21T13:56:54Z","pushed_at":"2015-10-28T13:07:09Z","git_url":"git://github.com/ga-dc/pixart_js.git","ssh_url":"git@github.com:ga-dc/pixart_js.git","clone_url":"https://github.com/ga-dc/pixart_js.git","svn_url":"https://github.com/ga-dc/pixart_js","homepage":"","size":1856,"stargazers_count":6,"watchers_count":6,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":151,"mirror_url":null,"open_issues_count":13,"forks":151,"open_issues":13,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ga-dc/pixart_js/pulls/92"},"html":{"href":"https://github.com/ga-dc/pixart_js/pull/92"},"issue":{"href":"https://api.github.com/repos/ga-dc/pixart_js/issues/92"},"comments":{"href":"https://api.github.com/repos/ga-dc/pixart_js/issues/92/comments"},"review_comments":{"href":"https://api.github.com/repos/ga-dc/pixart_js/pulls/92/comments"},"review_comment":{"href":"https://api.github.com/repos/ga-dc/pixart_js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ga-dc/pixart_js/pulls/92/commits"},"statuses":{"href":"https://api.github.com/repos/ga-dc/pixart_js/statuses/923b8c89b7d70452785492e111f92f9a7ec95db1"}}}}