{"action":"created","comment":{"url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/pulls/comments/78421545","id":78421545,"diff_hunk":"@@ -0,0 +1,48 @@\n+'use strict';\n+\n+define(function() {\n+  var Gallery = function(pictures) {\n+    var self = this;\n+    this.pictures = pictures;\n+    this.activePicture = 0;\n+    this.overlayGallery = document.querySelector('.overlay-gallery');\n+    this.galleryControlLeft = this.overlayGallery.querySelector('.overlay-gallery-control-left');\n+    this.galleryControlRight = this.overlayGallery.querySelector('.overlay-gallery-control-right');\n+    this.previewNumberCurrent = this.overlayGallery.querySelector('.preview-number-current');\n+    this.previewNumberTotal = this.overlayGallery.querySelector('.preview-number-total');\n+    this.overlayGalleryClose = this.overlayGallery.querySelector('.overlay-gallery-close');\n+    this.overlayGalleryPreview = this.overlayGallery.querySelector('.overlay-gallery-preview');\n+\n+    Gallery.prototype.show = function(number) {\n+      this.overlayGallery.classList.remove('invisible');\n+      this.eventListner();\n+      this.setActivePicture(number);\n+      this.previewNumberTotal.innerText = pictures.length;\n+    };\n+\n+    Gallery.prototype.hide = function() {\n+      this.overlayGallery.classList.add('invisible');\n+      this.overlayGalleryClose.onclick = null;\n+    };\n+\n+    Gallery.prototype.setActivePicture = function(imageNumber) {\n+      this.activePicture = imageNumber;\n+      this.previewNumberCurrent.innerText = imageNumber + 1;\n+      var img = new Image();\n+      img.src = this.pictures[imageNumber];\n+      if (this.overlayGalleryPreview.querySelector('img')) {","path":"src/gallery.js","position":33,"original_position":33,"commit_id":"f051a207b988530acb55132a163f612c288f0ac1","original_commit_id":"f051a207b988530acb55132a163f612c288f0ac1","user":{"login":"aalexeev239","id":6787602,"avatar_url":"https://avatars.githubusercontent.com/u/6787602?v=3","gravatar_id":"","url":"https://api.github.com/users/aalexeev239","html_url":"https://github.com/aalexeev239","followers_url":"https://api.github.com/users/aalexeev239/followers","following_url":"https://api.github.com/users/aalexeev239/following{/other_user}","gists_url":"https://api.github.com/users/aalexeev239/gists{/gist_id}","starred_url":"https://api.github.com/users/aalexeev239/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aalexeev239/subscriptions","organizations_url":"https://api.github.com/users/aalexeev239/orgs","repos_url":"https://api.github.com/users/aalexeev239/repos","events_url":"https://api.github.com/users/aalexeev239/events{/privacy}","received_events_url":"https://api.github.com/users/aalexeev239/received_events","type":"User","site_admin":false},"body":"стоит создать в конструкторе переменную, отвечающую за такой тег img, чтобы не обращаться каждый раз через querySelector","created_at":"2016-09-12T17:55:43Z","updated_at":"2016-09-12T17:55:43Z","html_url":"https://github.com/htmlacademy-javascript/105189-code-and-magick/pull/11#discussion_r78421545","pull_request_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/pulls/11","_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/pulls/comments/78421545"},"html":{"href":"https://github.com/htmlacademy-javascript/105189-code-and-magick/pull/11#discussion_r78421545"},"pull_request":{"href":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/pulls/11"}}},"pull_request":{"url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/pulls/11","id":84755394,"html_url":"https://github.com/htmlacademy-javascript/105189-code-and-magick/pull/11","diff_url":"https://github.com/htmlacademy-javascript/105189-code-and-magick/pull/11.diff","patch_url":"https://github.com/htmlacademy-javascript/105189-code-and-magick/pull/11.patch","issue_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/issues/11","number":11,"state":"open","locked":false,"title":"fix review.js","user":{"login":"cqbMatroskin","id":13838437,"avatar_url":"https://avatars.githubusercontent.com/u/13838437?v=3","gravatar_id":"","url":"https://api.github.com/users/cqbMatroskin","html_url":"https://github.com/cqbMatroskin","followers_url":"https://api.github.com/users/cqbMatroskin/followers","following_url":"https://api.github.com/users/cqbMatroskin/following{/other_user}","gists_url":"https://api.github.com/users/cqbMatroskin/gists{/gist_id}","starred_url":"https://api.github.com/users/cqbMatroskin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cqbMatroskin/subscriptions","organizations_url":"https://api.github.com/users/cqbMatroskin/orgs","repos_url":"https://api.github.com/users/cqbMatroskin/repos","events_url":"https://api.github.com/users/cqbMatroskin/events{/privacy}","received_events_url":"https://api.github.com/users/cqbMatroskin/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-09-10T13:24:28Z","updated_at":"2016-09-12T17:55:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ec2caf09a9fdf22f1912347c18397cb63a8a21bb","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/pulls/11/commits","review_comments_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/pulls/11/comments","review_comment_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/pulls/comments{/number}","comments_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/issues/11/comments","statuses_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/statuses/f051a207b988530acb55132a163f612c288f0ac1","head":{"label":"cqbMatroskin:module6-task1","ref":"module6-task1","sha":"f051a207b988530acb55132a163f612c288f0ac1","user":{"login":"cqbMatroskin","id":13838437,"avatar_url":"https://avatars.githubusercontent.com/u/13838437?v=3","gravatar_id":"","url":"https://api.github.com/users/cqbMatroskin","html_url":"https://github.com/cqbMatroskin","followers_url":"https://api.github.com/users/cqbMatroskin/followers","following_url":"https://api.github.com/users/cqbMatroskin/following{/other_user}","gists_url":"https://api.github.com/users/cqbMatroskin/gists{/gist_id}","starred_url":"https://api.github.com/users/cqbMatroskin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cqbMatroskin/subscriptions","organizations_url":"https://api.github.com/users/cqbMatroskin/orgs","repos_url":"https://api.github.com/users/cqbMatroskin/repos","events_url":"https://api.github.com/users/cqbMatroskin/events{/privacy}","received_events_url":"https://api.github.com/users/cqbMatroskin/received_events","type":"User","site_admin":false},"repo":{"id":64794316,"name":"105189-code-and-magick","full_name":"cqbMatroskin/105189-code-and-magick","owner":{"login":"cqbMatroskin","id":13838437,"avatar_url":"https://avatars.githubusercontent.com/u/13838437?v=3","gravatar_id":"","url":"https://api.github.com/users/cqbMatroskin","html_url":"https://github.com/cqbMatroskin","followers_url":"https://api.github.com/users/cqbMatroskin/followers","following_url":"https://api.github.com/users/cqbMatroskin/following{/other_user}","gists_url":"https://api.github.com/users/cqbMatroskin/gists{/gist_id}","starred_url":"https://api.github.com/users/cqbMatroskin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cqbMatroskin/subscriptions","organizations_url":"https://api.github.com/users/cqbMatroskin/orgs","repos_url":"https://api.github.com/users/cqbMatroskin/repos","events_url":"https://api.github.com/users/cqbMatroskin/events{/privacy}","received_events_url":"https://api.github.com/users/cqbMatroskin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cqbMatroskin/105189-code-and-magick","description":"Александр Максименков","fork":true,"url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick","forks_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/forks","keys_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/teams","hooks_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/hooks","issue_events_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/issues/events{/number}","events_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/events","assignees_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/assignees{/user}","branches_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/branches{/branch}","tags_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/tags","blobs_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/git/refs{/sha}","trees_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/statuses/{sha}","languages_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/languages","stargazers_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/stargazers","contributors_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/contributors","subscribers_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/subscribers","subscription_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/subscription","commits_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/commits{/sha}","git_commits_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/git/commits{/sha}","comments_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/comments{/number}","issue_comment_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/issues/comments{/number}","contents_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/contents/{+path}","compare_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/merges","archive_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/downloads","issues_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/issues{/number}","pulls_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/pulls{/number}","milestones_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/milestones{/number}","notifications_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/labels{/name}","releases_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/releases{/id}","deployments_url":"https://api.github.com/repos/cqbMatroskin/105189-code-and-magick/deployments","created_at":"2016-08-02T21:39:36Z","updated_at":"2016-08-02T21:39:38Z","pushed_at":"2016-09-12T14:50:38Z","git_url":"git://github.com/cqbMatroskin/105189-code-and-magick.git","ssh_url":"git@github.com:cqbMatroskin/105189-code-and-magick.git","clone_url":"https://github.com/cqbMatroskin/105189-code-and-magick.git","svn_url":"https://github.com/cqbMatroskin/105189-code-and-magick","homepage":null,"size":1522,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":false,"has_wiki":false,"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":"htmlacademy-javascript:master","ref":"master","sha":"cba57ce1821e03a790e7ad052ab47f2fe674da36","user":{"login":"htmlacademy-javascript","id":14179712,"avatar_url":"https://avatars.githubusercontent.com/u/14179712?v=3","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":64789601,"name":"105189-code-and-magick","full_name":"htmlacademy-javascript/105189-code-and-magick","owner":{"login":"htmlacademy-javascript","id":14179712,"avatar_url":"https://avatars.githubusercontent.com/u/14179712?v=3","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/105189-code-and-magick","description":"Александр Максименков","fork":false,"url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick","forks_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/forks","keys_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/keys{/key_id}","collaborators_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/teams","hooks_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/hooks","issue_events_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/issues/events{/number}","events_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/events","assignees_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/assignees{/user}","branches_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/branches{/branch}","tags_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/tags","blobs_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/git/refs{/sha}","trees_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/git/trees{/sha}","statuses_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/statuses/{sha}","languages_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/languages","stargazers_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/stargazers","contributors_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/contributors","subscribers_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/subscribers","subscription_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/subscription","commits_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/commits{/sha}","git_commits_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/git/commits{/sha}","comments_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/comments{/number}","issue_comment_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/issues/comments{/number}","contents_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/contents/{+path}","compare_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/compare/{base}...{head}","merges_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/merges","archive_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/downloads","issues_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/issues{/number}","pulls_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/pulls{/number}","milestones_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/milestones{/number}","notifications_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/labels{/name}","releases_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/releases{/id}","deployments_url":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/deployments","created_at":"2016-08-02T20:16:14Z","updated_at":"2016-08-02T21:57:56Z","pushed_at":"2016-09-12T14:50:38Z","git_url":"git://github.com/htmlacademy-javascript/105189-code-and-magick.git","ssh_url":"git@github.com:htmlacademy-javascript/105189-code-and-magick.git","clone_url":"https://github.com/htmlacademy-javascript/105189-code-and-magick.git","svn_url":"https://github.com/htmlacademy-javascript/105189-code-and-magick","homepage":"https://github.com/cqbMatroskin/105189-code-and-magick","size":1535,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/pulls/11"},"html":{"href":"https://github.com/htmlacademy-javascript/105189-code-and-magick/pull/11"},"issue":{"href":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/issues/11"},"comments":{"href":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/issues/11/comments"},"review_comments":{"href":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/pulls/11/comments"},"review_comment":{"href":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/pulls/11/commits"},"statuses":{"href":"https://api.github.com/repos/htmlacademy-javascript/105189-code-and-magick/statuses/f051a207b988530acb55132a163f612c288f0ac1"}}}}
{"actor":{"display_login":"aalexeev239"}}