{"action":"created","comment":{"url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/pulls/comments/154529492","pull_request_review_id":80703517,"id":154529492,"diff_hunk":"@@ -144,3 +163,131 @@ var renderSetupPopup = function (wizards) {\n };\n \n renderSetupPopup(createRandomWizards(WIZARD_PARTS, 4));\n+\n+\n+var ESC_KEYCODE = 27;\n+var ENTER_KEYCODE = 13;\n+\n+var setupOpen = document.querySelector('.setup-open');\n+var setupOpenIcon = setupOpen.querySelector('.setup-open-icon');\n+\n+var setupClose = document.querySelector('.setup-close');\n+\n+var setupUserName = document.querySelector('.setup-user-name');\n+\n+/**\n+ * Обработчик закрытия попапа\n+ * @param {MouseEvent} event\n+ */\n+var onPopupEscPress = function (event) {\n+  if (event.keyCode === ESC_KEYCODE && !(setupUserName === document.activeElement)) {\n+    closePopup();\n+  }\n+};\n+\n+/**\n+ * Обработчик открытия попапа\n+ * @param {MouseEvent} event\n+ */\n+var onPopupEnterPress = function (event) {\n+  if (event.keyCode === ENTER_KEYCODE) {\n+    openPopup();\n+  }\n+};\n+\n+\n+/**\n+ * Открывает попап","path":"js/setup.js","position":96,"original_position":96,"commit_id":"af13e68b99b02912d576bccf76cc2cd64aaeab61","original_commit_id":"af13e68b99b02912d576bccf76cc2cd64aaeab61","user":{"login":"isqua","id":529247,"avatar_url":"https://avatars1.githubusercontent.com/u/529247?v=4","gravatar_id":"","url":"https://api.github.com/users/isqua","html_url":"https://github.com/isqua","followers_url":"https://api.github.com/users/isqua/followers","following_url":"https://api.github.com/users/isqua/following{/other_user}","gists_url":"https://api.github.com/users/isqua/gists{/gist_id}","starred_url":"https://api.github.com/users/isqua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isqua/subscriptions","organizations_url":"https://api.github.com/users/isqua/orgs","repos_url":"https://api.github.com/users/isqua/repos","events_url":"https://api.github.com/users/isqua/events{/privacy}","received_events_url":"https://api.github.com/users/isqua/received_events","type":"User","site_admin":false},"body":"К таким говорящим названиям функций описания можно не писать :)","created_at":"2017-12-03T16:49:26Z","updated_at":"2017-12-03T16:58:44Z","html_url":"https://github.com/htmlacademy-javascript/282187-code-and-magick/pull/6#discussion_r154529492","pull_request_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/pulls/6","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/pulls/comments/154529492"},"html":{"href":"https://github.com/htmlacademy-javascript/282187-code-and-magick/pull/6#discussion_r154529492"},"pull_request":{"href":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/pulls/6","id":156056839,"html_url":"https://github.com/htmlacademy-javascript/282187-code-and-magick/pull/6","diff_url":"https://github.com/htmlacademy-javascript/282187-code-and-magick/pull/6.diff","patch_url":"https://github.com/htmlacademy-javascript/282187-code-and-magick/pull/6.patch","issue_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/issues/6","number":6,"state":"open","locked":false,"title":"Учебный проект: одеть Надежду","user":{"login":"KasiMaru","id":26373955,"avatar_url":"https://avatars1.githubusercontent.com/u/26373955?v=4","gravatar_id":"","url":"https://api.github.com/users/KasiMaru","html_url":"https://github.com/KasiMaru","followers_url":"https://api.github.com/users/KasiMaru/followers","following_url":"https://api.github.com/users/KasiMaru/following{/other_user}","gists_url":"https://api.github.com/users/KasiMaru/gists{/gist_id}","starred_url":"https://api.github.com/users/KasiMaru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KasiMaru/subscriptions","organizations_url":"https://api.github.com/users/KasiMaru/orgs","repos_url":"https://api.github.com/users/KasiMaru/repos","events_url":"https://api.github.com/users/KasiMaru/events{/privacy}","received_events_url":"https://api.github.com/users/KasiMaru/received_events","type":"User","site_admin":false},"body":"\n\n---\n:mortar_board: [Учебный проект: одеть Надежду](https://up.htmlacademy.ru/javascript/11/user/282187/tasks/12)\n\n:boom: https://htmlacademy-javascript.github.io/282187-code-and-magick/6/","created_at":"2017-12-03T11:40:53Z","updated_at":"2017-12-03T16:58:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"91a9e6740ba8daf5d996b42b978e74d7cbd2c191","assignee":{"login":"isqua","id":529247,"avatar_url":"https://avatars1.githubusercontent.com/u/529247?v=4","gravatar_id":"","url":"https://api.github.com/users/isqua","html_url":"https://github.com/isqua","followers_url":"https://api.github.com/users/isqua/followers","following_url":"https://api.github.com/users/isqua/following{/other_user}","gists_url":"https://api.github.com/users/isqua/gists{/gist_id}","starred_url":"https://api.github.com/users/isqua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isqua/subscriptions","organizations_url":"https://api.github.com/users/isqua/orgs","repos_url":"https://api.github.com/users/isqua/repos","events_url":"https://api.github.com/users/isqua/events{/privacy}","received_events_url":"https://api.github.com/users/isqua/received_events","type":"User","site_admin":false},"assignees":[{"login":"isqua","id":529247,"avatar_url":"https://avatars1.githubusercontent.com/u/529247?v=4","gravatar_id":"","url":"https://api.github.com/users/isqua","html_url":"https://github.com/isqua","followers_url":"https://api.github.com/users/isqua/followers","following_url":"https://api.github.com/users/isqua/following{/other_user}","gists_url":"https://api.github.com/users/isqua/gists{/gist_id}","starred_url":"https://api.github.com/users/isqua/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/isqua/subscriptions","organizations_url":"https://api.github.com/users/isqua/orgs","repos_url":"https://api.github.com/users/isqua/repos","events_url":"https://api.github.com/users/isqua/events{/privacy}","received_events_url":"https://api.github.com/users/isqua/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/pulls/6/commits","review_comments_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/pulls/6/comments","review_comment_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/pulls/comments{/number}","comments_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/issues/6/comments","statuses_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/statuses/af13e68b99b02912d576bccf76cc2cd64aaeab61","head":{"label":"KasiMaru:module4-task1","ref":"module4-task1","sha":"af13e68b99b02912d576bccf76cc2cd64aaeab61","user":{"login":"KasiMaru","id":26373955,"avatar_url":"https://avatars1.githubusercontent.com/u/26373955?v=4","gravatar_id":"","url":"https://api.github.com/users/KasiMaru","html_url":"https://github.com/KasiMaru","followers_url":"https://api.github.com/users/KasiMaru/followers","following_url":"https://api.github.com/users/KasiMaru/following{/other_user}","gists_url":"https://api.github.com/users/KasiMaru/gists{/gist_id}","starred_url":"https://api.github.com/users/KasiMaru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KasiMaru/subscriptions","organizations_url":"https://api.github.com/users/KasiMaru/orgs","repos_url":"https://api.github.com/users/KasiMaru/repos","events_url":"https://api.github.com/users/KasiMaru/events{/privacy}","received_events_url":"https://api.github.com/users/KasiMaru/received_events","type":"User","site_admin":false},"repo":{"id":110731804,"name":"code-and-magick","full_name":"KasiMaru/code-and-magick","owner":{"login":"KasiMaru","id":26373955,"avatar_url":"https://avatars1.githubusercontent.com/u/26373955?v=4","gravatar_id":"","url":"https://api.github.com/users/KasiMaru","html_url":"https://github.com/KasiMaru","followers_url":"https://api.github.com/users/KasiMaru/followers","following_url":"https://api.github.com/users/KasiMaru/following{/other_user}","gists_url":"https://api.github.com/users/KasiMaru/gists{/gist_id}","starred_url":"https://api.github.com/users/KasiMaru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KasiMaru/subscriptions","organizations_url":"https://api.github.com/users/KasiMaru/orgs","repos_url":"https://api.github.com/users/KasiMaru/repos","events_url":"https://api.github.com/users/KasiMaru/events{/privacy}","received_events_url":"https://api.github.com/users/KasiMaru/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/KasiMaru/code-and-magick","description":"Тимур Касиев","fork":true,"url":"https://api.github.com/repos/KasiMaru/code-and-magick","forks_url":"https://api.github.com/repos/KasiMaru/code-and-magick/forks","keys_url":"https://api.github.com/repos/KasiMaru/code-and-magick/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KasiMaru/code-and-magick/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KasiMaru/code-and-magick/teams","hooks_url":"https://api.github.com/repos/KasiMaru/code-and-magick/hooks","issue_events_url":"https://api.github.com/repos/KasiMaru/code-and-magick/issues/events{/number}","events_url":"https://api.github.com/repos/KasiMaru/code-and-magick/events","assignees_url":"https://api.github.com/repos/KasiMaru/code-and-magick/assignees{/user}","branches_url":"https://api.github.com/repos/KasiMaru/code-and-magick/branches{/branch}","tags_url":"https://api.github.com/repos/KasiMaru/code-and-magick/tags","blobs_url":"https://api.github.com/repos/KasiMaru/code-and-magick/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KasiMaru/code-and-magick/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KasiMaru/code-and-magick/git/refs{/sha}","trees_url":"https://api.github.com/repos/KasiMaru/code-and-magick/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KasiMaru/code-and-magick/statuses/{sha}","languages_url":"https://api.github.com/repos/KasiMaru/code-and-magick/languages","stargazers_url":"https://api.github.com/repos/KasiMaru/code-and-magick/stargazers","contributors_url":"https://api.github.com/repos/KasiMaru/code-and-magick/contributors","subscribers_url":"https://api.github.com/repos/KasiMaru/code-and-magick/subscribers","subscription_url":"https://api.github.com/repos/KasiMaru/code-and-magick/subscription","commits_url":"https://api.github.com/repos/KasiMaru/code-and-magick/commits{/sha}","git_commits_url":"https://api.github.com/repos/KasiMaru/code-and-magick/git/commits{/sha}","comments_url":"https://api.github.com/repos/KasiMaru/code-and-magick/comments{/number}","issue_comment_url":"https://api.github.com/repos/KasiMaru/code-and-magick/issues/comments{/number}","contents_url":"https://api.github.com/repos/KasiMaru/code-and-magick/contents/{+path}","compare_url":"https://api.github.com/repos/KasiMaru/code-and-magick/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KasiMaru/code-and-magick/merges","archive_url":"https://api.github.com/repos/KasiMaru/code-and-magick/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KasiMaru/code-and-magick/downloads","issues_url":"https://api.github.com/repos/KasiMaru/code-and-magick/issues{/number}","pulls_url":"https://api.github.com/repos/KasiMaru/code-and-magick/pulls{/number}","milestones_url":"https://api.github.com/repos/KasiMaru/code-and-magick/milestones{/number}","notifications_url":"https://api.github.com/repos/KasiMaru/code-and-magick/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KasiMaru/code-and-magick/labels{/name}","releases_url":"https://api.github.com/repos/KasiMaru/code-and-magick/releases{/id}","deployments_url":"https://api.github.com/repos/KasiMaru/code-and-magick/deployments","created_at":"2017-11-14T18:58:54Z","updated_at":"2017-11-17T11:13:18Z","pushed_at":"2017-12-03T15:08:16Z","git_url":"git://github.com/KasiMaru/code-and-magick.git","ssh_url":"git@github.com:KasiMaru/code-and-magick.git","clone_url":"https://github.com/KasiMaru/code-and-magick.git","svn_url":"https://github.com/KasiMaru/code-and-magick","homepage":null,"size":1086,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"htmlacademy-javascript:master","ref":"master","sha":"9539cd2b1f01609aa329020cc930f55824cf1525","user":{"login":"htmlacademy-javascript","id":14179712,"avatar_url":"https://avatars2.githubusercontent.com/u/14179712?v=4","gravatar_id":"","url":"https://api.github.com/users/htmlacademy-javascript","html_url":"https://github.com/htmlacademy-javascript","followers_url":"https://api.github.com/users/htmlacademy-javascript/followers","following_url":"https://api.github.com/users/htmlacademy-javascript/following{/other_user}","gists_url":"https://api.github.com/users/htmlacademy-javascript/gists{/gist_id}","starred_url":"https://api.github.com/users/htmlacademy-javascript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htmlacademy-javascript/subscriptions","organizations_url":"https://api.github.com/users/htmlacademy-javascript/orgs","repos_url":"https://api.github.com/users/htmlacademy-javascript/repos","events_url":"https://api.github.com/users/htmlacademy-javascript/events{/privacy}","received_events_url":"https://api.github.com/users/htmlacademy-javascript/received_events","type":"Organization","site_admin":false},"repo":{"id":110731536,"name":"282187-code-and-magick","full_name":"htmlacademy-javascript/282187-code-and-magick","owner":{"login":"htmlacademy-javascript","id":14179712,"avatar_url":"https://avatars2.githubusercontent.com/u/14179712?v=4","gravatar_id":"","url":"https://api.github.com/users/htmlacademy-javascript","html_url":"https://github.com/htmlacademy-javascript","followers_url":"https://api.github.com/users/htmlacademy-javascript/followers","following_url":"https://api.github.com/users/htmlacademy-javascript/following{/other_user}","gists_url":"https://api.github.com/users/htmlacademy-javascript/gists{/gist_id}","starred_url":"https://api.github.com/users/htmlacademy-javascript/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htmlacademy-javascript/subscriptions","organizations_url":"https://api.github.com/users/htmlacademy-javascript/orgs","repos_url":"https://api.github.com/users/htmlacademy-javascript/repos","events_url":"https://api.github.com/users/htmlacademy-javascript/events{/privacy}","received_events_url":"https://api.github.com/users/htmlacademy-javascript/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/htmlacademy-javascript/282187-code-and-magick","description":"Тимур Касиев","fork":false,"url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick","forks_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/forks","keys_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/keys{/key_id}","collaborators_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/teams","hooks_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/hooks","issue_events_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/issues/events{/number}","events_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/events","assignees_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/assignees{/user}","branches_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/branches{/branch}","tags_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/tags","blobs_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/git/refs{/sha}","trees_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/git/trees{/sha}","statuses_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/statuses/{sha}","languages_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/languages","stargazers_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/stargazers","contributors_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/contributors","subscribers_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/subscribers","subscription_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/subscription","commits_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/commits{/sha}","git_commits_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/git/commits{/sha}","comments_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/comments{/number}","issue_comment_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/issues/comments{/number}","contents_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/contents/{+path}","compare_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/compare/{base}...{head}","merges_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/merges","archive_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/downloads","issues_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/issues{/number}","pulls_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/pulls{/number}","milestones_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/milestones{/number}","notifications_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/labels{/name}","releases_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/releases{/id}","deployments_url":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/deployments","created_at":"2017-11-14T18:56:24Z","updated_at":"2017-11-15T07:23:02Z","pushed_at":"2017-12-03T15:08:17Z","git_url":"git://github.com/htmlacademy-javascript/282187-code-and-magick.git","ssh_url":"git@github.com:htmlacademy-javascript/282187-code-and-magick.git","clone_url":"https://github.com/htmlacademy-javascript/282187-code-and-magick.git","svn_url":"https://github.com/htmlacademy-javascript/282187-code-and-magick","homepage":"https://github.com/KasiMaru/282187-code-and-magick","size":1100,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":true,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/pulls/6"},"html":{"href":"https://github.com/htmlacademy-javascript/282187-code-and-magick/pull/6"},"issue":{"href":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/issues/6"},"comments":{"href":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/htmlacademy-javascript/282187-code-and-magick/statuses/af13e68b99b02912d576bccf76cc2cd64aaeab61"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"isqua"}}