{"action":"closed","number":32,"pull_request":{"url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/pulls/32","id":95362670,"html_url":"https://github.com/anantdgoel/HackPrincetonF16/pull/32","diff_url":"https://github.com/anantdgoel/HackPrincetonF16/pull/32.diff","patch_url":"https://github.com/anantdgoel/HackPrincetonF16/pull/32.patch","issue_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/issues/32","number":32,"state":"closed","locked":false,"title":"some code cleanup and performance improvements","user":{"login":"lewisje","id":4865237,"avatar_url":"https://avatars.githubusercontent.com/u/4865237?v=3","gravatar_id":"","url":"https://api.github.com/users/lewisje","html_url":"https://github.com/lewisje","followers_url":"https://api.github.com/users/lewisje/followers","following_url":"https://api.github.com/users/lewisje/following{/other_user}","gists_url":"https://api.github.com/users/lewisje/gists{/gist_id}","starred_url":"https://api.github.com/users/lewisje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lewisje/subscriptions","organizations_url":"https://api.github.com/users/lewisje/orgs","repos_url":"https://api.github.com/users/lewisje/repos","events_url":"https://api.github.com/users/lewisje/events{/privacy}","received_events_url":"https://api.github.com/users/lewisje/received_events","type":"User","site_admin":false},"body":"The most important changes are explicitly declaring the variables in the `createButton` function, pulling the pure function expression out of the function it was created in, so that the same function object can be re-used in the promise returned from `fetch` (the same cannot be done with the next `then` step, because that function actually relies on a parameter that was passed into `httpGet`, and therefore is not a pure function), and re-ordering the scripts in the head of the popup HTML file, because the external scripts were in the reverse of their dependency order.\r\n\r\nAdditionally, it's a best practice to put greenfield JS into strict mode, and to abbreviate a check against (`null` or `undefined`) with `== null` or `!= null`, because `null` is a reserved word and `undefined` is not.\r\n\r\nThere are other things I could have done in this PR (like using strict comparisons, `===` and `!==`, for all purposes *except* abbreviating the `null`-or-`undefined` checks), but I decided not to put too many things into one PR.\r\n\r\n---\r\nAs for the extension icon, [FileOptimizer](http://nikkhokkho.sourceforge.net/static.php?page=FileOptimizer) is an invaluable tool, and there are similar automated suites for macOS and other Unix-like systems.","created_at":"2016-11-26T06:14:20Z","updated_at":"2016-11-27T06:09:13Z","closed_at":"2016-11-27T06:09:13Z","merged_at":"2016-11-27T06:09:13Z","merge_commit_sha":"40403021b5816a23674fdd5be3552b83faecf2dc","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/pulls/32/commits","review_comments_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/pulls/32/comments","review_comment_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/pulls/comments{/number}","comments_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/issues/32/comments","statuses_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/statuses/e699f29bcd9dc61af9d8135a6a9ac6dfa905dec4","head":{"label":"lewisje:master","ref":"master","sha":"e699f29bcd9dc61af9d8135a6a9ac6dfa905dec4","user":{"login":"lewisje","id":4865237,"avatar_url":"https://avatars.githubusercontent.com/u/4865237?v=3","gravatar_id":"","url":"https://api.github.com/users/lewisje","html_url":"https://github.com/lewisje","followers_url":"https://api.github.com/users/lewisje/followers","following_url":"https://api.github.com/users/lewisje/following{/other_user}","gists_url":"https://api.github.com/users/lewisje/gists{/gist_id}","starred_url":"https://api.github.com/users/lewisje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lewisje/subscriptions","organizations_url":"https://api.github.com/users/lewisje/orgs","repos_url":"https://api.github.com/users/lewisje/repos","events_url":"https://api.github.com/users/lewisje/events{/privacy}","received_events_url":"https://api.github.com/users/lewisje/received_events","type":"User","site_admin":false},"repo":{"id":74807253,"name":"HackPrincetonF16","full_name":"lewisje/HackPrincetonF16","owner":{"login":"lewisje","id":4865237,"avatar_url":"https://avatars.githubusercontent.com/u/4865237?v=3","gravatar_id":"","url":"https://api.github.com/users/lewisje","html_url":"https://github.com/lewisje","followers_url":"https://api.github.com/users/lewisje/followers","following_url":"https://api.github.com/users/lewisje/following{/other_user}","gists_url":"https://api.github.com/users/lewisje/gists{/gist_id}","starred_url":"https://api.github.com/users/lewisje/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lewisje/subscriptions","organizations_url":"https://api.github.com/users/lewisje/orgs","repos_url":"https://api.github.com/users/lewisje/repos","events_url":"https://api.github.com/users/lewisje/events{/privacy}","received_events_url":"https://api.github.com/users/lewisje/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lewisje/HackPrincetonF16","description":null,"fork":true,"url":"https://api.github.com/repos/lewisje/HackPrincetonF16","forks_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/forks","keys_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/teams","hooks_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/hooks","issue_events_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/issues/events{/number}","events_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/events","assignees_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/assignees{/user}","branches_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/branches{/branch}","tags_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/tags","blobs_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/git/refs{/sha}","trees_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/statuses/{sha}","languages_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/languages","stargazers_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/stargazers","contributors_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/contributors","subscribers_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/subscribers","subscription_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/subscription","commits_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/commits{/sha}","git_commits_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/git/commits{/sha}","comments_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/comments{/number}","issue_comment_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/issues/comments{/number}","contents_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/contents/{+path}","compare_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/merges","archive_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/downloads","issues_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/issues{/number}","pulls_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/pulls{/number}","milestones_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/milestones{/number}","notifications_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/labels{/name}","releases_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/releases{/id}","deployments_url":"https://api.github.com/repos/lewisje/HackPrincetonF16/deployments","created_at":"2016-11-26T05:42:58Z","updated_at":"2016-11-26T05:42:59Z","pushed_at":"2016-11-26T06:32:56Z","git_url":"git://github.com/lewisje/HackPrincetonF16.git","ssh_url":"git@github.com:lewisje/HackPrincetonF16.git","clone_url":"https://github.com/lewisje/HackPrincetonF16.git","svn_url":"https://github.com/lewisje/HackPrincetonF16","homepage":null,"size":567,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"anantdgoel:master","ref":"master","sha":"b388ffc1eb18e2a0f7eac049b0c14c08bf662bc8","user":{"login":"anantdgoel","id":3103248,"avatar_url":"https://avatars.githubusercontent.com/u/3103248?v=3","gravatar_id":"","url":"https://api.github.com/users/anantdgoel","html_url":"https://github.com/anantdgoel","followers_url":"https://api.github.com/users/anantdgoel/followers","following_url":"https://api.github.com/users/anantdgoel/following{/other_user}","gists_url":"https://api.github.com/users/anantdgoel/gists{/gist_id}","starred_url":"https://api.github.com/users/anantdgoel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anantdgoel/subscriptions","organizations_url":"https://api.github.com/users/anantdgoel/orgs","repos_url":"https://api.github.com/users/anantdgoel/repos","events_url":"https://api.github.com/users/anantdgoel/events{/privacy}","received_events_url":"https://api.github.com/users/anantdgoel/received_events","type":"User","site_admin":false},"repo":{"id":73530096,"name":"HackPrincetonF16","full_name":"anantdgoel/HackPrincetonF16","owner":{"login":"anantdgoel","id":3103248,"avatar_url":"https://avatars.githubusercontent.com/u/3103248?v=3","gravatar_id":"","url":"https://api.github.com/users/anantdgoel","html_url":"https://github.com/anantdgoel","followers_url":"https://api.github.com/users/anantdgoel/followers","following_url":"https://api.github.com/users/anantdgoel/following{/other_user}","gists_url":"https://api.github.com/users/anantdgoel/gists{/gist_id}","starred_url":"https://api.github.com/users/anantdgoel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anantdgoel/subscriptions","organizations_url":"https://api.github.com/users/anantdgoel/orgs","repos_url":"https://api.github.com/users/anantdgoel/repos","events_url":"https://api.github.com/users/anantdgoel/events{/privacy}","received_events_url":"https://api.github.com/users/anantdgoel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/anantdgoel/HackPrincetonF16","description":null,"fork":false,"url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16","forks_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/forks","keys_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/keys{/key_id}","collaborators_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/teams","hooks_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/hooks","issue_events_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/issues/events{/number}","events_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/events","assignees_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/assignees{/user}","branches_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/branches{/branch}","tags_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/tags","blobs_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/git/refs{/sha}","trees_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/git/trees{/sha}","statuses_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/statuses/{sha}","languages_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/languages","stargazers_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/stargazers","contributors_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/contributors","subscribers_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/subscribers","subscription_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/subscription","commits_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/commits{/sha}","git_commits_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/git/commits{/sha}","comments_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/comments{/number}","issue_comment_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/issues/comments{/number}","contents_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/contents/{+path}","compare_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/compare/{base}...{head}","merges_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/merges","archive_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/downloads","issues_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/issues{/number}","pulls_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/pulls{/number}","milestones_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/milestones{/number}","notifications_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/labels{/name}","releases_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/releases{/id}","deployments_url":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/deployments","created_at":"2016-11-12T03:51:13Z","updated_at":"2016-11-27T04:55:43Z","pushed_at":"2016-11-27T06:09:14Z","git_url":"git://github.com/anantdgoel/HackPrincetonF16.git","ssh_url":"git@github.com:anantdgoel/HackPrincetonF16.git","clone_url":"https://github.com/anantdgoel/HackPrincetonF16.git","svn_url":"https://github.com/anantdgoel/HackPrincetonF16","homepage":null,"size":410,"stargazers_count":606,"watchers_count":606,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":178,"mirror_url":null,"open_issues_count":13,"forks":178,"open_issues":13,"watchers":606,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/pulls/32"},"html":{"href":"https://github.com/anantdgoel/HackPrincetonF16/pull/32"},"issue":{"href":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/issues/32"},"comments":{"href":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/issues/32/comments"},"review_comments":{"href":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/pulls/32/comments"},"review_comment":{"href":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/pulls/32/commits"},"statuses":{"href":"https://api.github.com/repos/anantdgoel/HackPrincetonF16/statuses/e699f29bcd9dc61af9d8135a6a9ac6dfa905dec4"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"anantdgoel","id":3103248,"avatar_url":"https://avatars.githubusercontent.com/u/3103248?v=3","gravatar_id":"","url":"https://api.github.com/users/anantdgoel","html_url":"https://github.com/anantdgoel","followers_url":"https://api.github.com/users/anantdgoel/followers","following_url":"https://api.github.com/users/anantdgoel/following{/other_user}","gists_url":"https://api.github.com/users/anantdgoel/gists{/gist_id}","starred_url":"https://api.github.com/users/anantdgoel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/anantdgoel/subscriptions","organizations_url":"https://api.github.com/users/anantdgoel/orgs","repos_url":"https://api.github.com/users/anantdgoel/repos","events_url":"https://api.github.com/users/anantdgoel/events{/privacy}","received_events_url":"https://api.github.com/users/anantdgoel/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":5,"additions":29,"deletions":30,"changed_files":3}}
{"actor":{"display_login":"anantdgoel"}}