{"action":"created","comment":{"url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/pulls/comments/61791657","id":61791657,"diff_hunk":"@@ -0,0 +1,61 @@\n+'use strict';\n+\n+var utilities = require('../utilities');\n+var ReviewData = require('./data');\n+var templateElement = document.querySelector('template');\n+var cloneElement = (templateElement.content || templateElement).querySelector('.review');\n+\n+function makeTemplate(data) {\n+  var ratingBlockWidth = 30;\n+  var loadFailure = 'review-load-failure';\n+\n+  var review = cloneElement.cloneNode(true);\n+  var reviewImage = review.querySelector('.review-author');\n+  var reviewRating = review.querySelector('.review-rating');\n+  var reviewText = review.querySelector('.review-text');\n+  var reviewUsefulness = review.querySelector('.review-usefulness-value');\n+\n+  var reviewObject = new ReviewData(data);\n+\n+  var authorPhoto = reviewObject.getPhoto();\n+\n+  reviewText.textContent = reviewObject.getText() + ' Дата:' + reviewObject.getDate();\n+  reviewUsefulness.textContent = reviewObject.getUsefulness();\n+  reviewImage.alt = reviewObject.getName();\n+  reviewImage.title = reviewObject.getName();\n+  reviewRating.style.width = (reviewObject.getRating() * ratingBlockWidth) + 'px';\n+\n+  utilities.createImage(authorPhoto, function(error) {\n+    /**\n+     * @constant {Number} pictureSize - values of width and height for images.\n+     */\n+    var pictureSize = 124;\n+\n+    if (error) {\n+      review.classList.add(loadFailure);\n+    } else {\n+      reviewImage.src = authorPhoto;\n+      reviewImage.width = pictureSize;\n+      reviewImage.height = pictureSize;\n+    }\n+  });\n+\n+  return review;\n+}\n+\n+function changeTemplate(source, trigger) {\n+  var review = source.element;\n+  var reviewObject = new ReviewData(source.data);","path":"src/reviews/template.js","position":48,"original_position":48,"commit_id":"dbc9cfd6d7a7df58d26f542132fdd9b69e9d409c","original_commit_id":"dbc9cfd6d7a7df58d26f542132fdd9b69e9d409c","user":{"login":"isqua","id":529247,"avatar_url":"https://avatars.githubusercontent.com/u/529247?v=3","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":"2016-05-02T19:42:55Z","updated_at":"2016-05-02T19:42:55Z","html_url":"https://github.com/htmlacademy-javascript/42390-code-and-magick/pull/20#discussion_r61791657","pull_request_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/pulls/20","_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/pulls/comments/61791657"},"html":{"href":"https://github.com/htmlacademy-javascript/42390-code-and-magick/pull/20#discussion_r61791657"},"pull_request":{"href":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/pulls/20"}}},"pull_request":{"url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/pulls/20","id":68400024,"html_url":"https://github.com/htmlacademy-javascript/42390-code-and-magick/pull/20","diff_url":"https://github.com/htmlacademy-javascript/42390-code-and-magick/pull/20.diff","patch_url":"https://github.com/htmlacademy-javascript/42390-code-and-magick/pull/20.patch","issue_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/issues/20","number":20,"state":"open","locked":false,"title":"Контексты и прототипы","user":{"login":"fyvfyv","id":3251438,"avatar_url":"https://avatars.githubusercontent.com/u/3251438?v=3","gravatar_id":"","url":"https://api.github.com/users/fyvfyv","html_url":"https://github.com/fyvfyv","followers_url":"https://api.github.com/users/fyvfyv/followers","following_url":"https://api.github.com/users/fyvfyv/following{/other_user}","gists_url":"https://api.github.com/users/fyvfyv/gists{/gist_id}","starred_url":"https://api.github.com/users/fyvfyv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fyvfyv/subscriptions","organizations_url":"https://api.github.com/users/fyvfyv/orgs","repos_url":"https://api.github.com/users/fyvfyv/repos","events_url":"https://api.github.com/users/fyvfyv/events{/privacy}","received_events_url":"https://api.github.com/users/fyvfyv/received_events","type":"User","site_admin":false},"body":"\n\n--\n:boom: https://htmlacademy-javascript.github.io/42390-code-and-magick/20/","created_at":"2016-04-29T16:42:36Z","updated_at":"2016-05-02T19:42:55Z","closed_at":null,"merged_at":null,"merge_commit_sha":"251989ff1c42f107b2fe461efa4ef211e2971bc7","assignee":{"login":"isqua","id":529247,"avatar_url":"https://avatars.githubusercontent.com/u/529247?v=3","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},"milestone":null,"commits_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/pulls/20/commits","review_comments_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/pulls/20/comments","review_comment_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/pulls/comments{/number}","comments_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/issues/20/comments","statuses_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/statuses/dbc9cfd6d7a7df58d26f542132fdd9b69e9d409c","head":{"label":"fyvfyv:module9-task3","ref":"module9-task3","sha":"dbc9cfd6d7a7df58d26f542132fdd9b69e9d409c","user":{"login":"fyvfyv","id":3251438,"avatar_url":"https://avatars.githubusercontent.com/u/3251438?v=3","gravatar_id":"","url":"https://api.github.com/users/fyvfyv","html_url":"https://github.com/fyvfyv","followers_url":"https://api.github.com/users/fyvfyv/followers","following_url":"https://api.github.com/users/fyvfyv/following{/other_user}","gists_url":"https://api.github.com/users/fyvfyv/gists{/gist_id}","starred_url":"https://api.github.com/users/fyvfyv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fyvfyv/subscriptions","organizations_url":"https://api.github.com/users/fyvfyv/orgs","repos_url":"https://api.github.com/users/fyvfyv/repos","events_url":"https://api.github.com/users/fyvfyv/events{/privacy}","received_events_url":"https://api.github.com/users/fyvfyv/received_events","type":"User","site_admin":false},"repo":{"id":54500671,"name":"code-and-magick","full_name":"fyvfyv/code-and-magick","owner":{"login":"fyvfyv","id":3251438,"avatar_url":"https://avatars.githubusercontent.com/u/3251438?v=3","gravatar_id":"","url":"https://api.github.com/users/fyvfyv","html_url":"https://github.com/fyvfyv","followers_url":"https://api.github.com/users/fyvfyv/followers","following_url":"https://api.github.com/users/fyvfyv/following{/other_user}","gists_url":"https://api.github.com/users/fyvfyv/gists{/gist_id}","starred_url":"https://api.github.com/users/fyvfyv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fyvfyv/subscriptions","organizations_url":"https://api.github.com/users/fyvfyv/orgs","repos_url":"https://api.github.com/users/fyvfyv/repos","events_url":"https://api.github.com/users/fyvfyv/events{/privacy}","received_events_url":"https://api.github.com/users/fyvfyv/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fyvfyv/code-and-magick","description":"Олег Петров","fork":true,"url":"https://api.github.com/repos/fyvfyv/code-and-magick","forks_url":"https://api.github.com/repos/fyvfyv/code-and-magick/forks","keys_url":"https://api.github.com/repos/fyvfyv/code-and-magick/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fyvfyv/code-and-magick/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fyvfyv/code-and-magick/teams","hooks_url":"https://api.github.com/repos/fyvfyv/code-and-magick/hooks","issue_events_url":"https://api.github.com/repos/fyvfyv/code-and-magick/issues/events{/number}","events_url":"https://api.github.com/repos/fyvfyv/code-and-magick/events","assignees_url":"https://api.github.com/repos/fyvfyv/code-and-magick/assignees{/user}","branches_url":"https://api.github.com/repos/fyvfyv/code-and-magick/branches{/branch}","tags_url":"https://api.github.com/repos/fyvfyv/code-and-magick/tags","blobs_url":"https://api.github.com/repos/fyvfyv/code-and-magick/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fyvfyv/code-and-magick/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fyvfyv/code-and-magick/git/refs{/sha}","trees_url":"https://api.github.com/repos/fyvfyv/code-and-magick/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fyvfyv/code-and-magick/statuses/{sha}","languages_url":"https://api.github.com/repos/fyvfyv/code-and-magick/languages","stargazers_url":"https://api.github.com/repos/fyvfyv/code-and-magick/stargazers","contributors_url":"https://api.github.com/repos/fyvfyv/code-and-magick/contributors","subscribers_url":"https://api.github.com/repos/fyvfyv/code-and-magick/subscribers","subscription_url":"https://api.github.com/repos/fyvfyv/code-and-magick/subscription","commits_url":"https://api.github.com/repos/fyvfyv/code-and-magick/commits{/sha}","git_commits_url":"https://api.github.com/repos/fyvfyv/code-and-magick/git/commits{/sha}","comments_url":"https://api.github.com/repos/fyvfyv/code-and-magick/comments{/number}","issue_comment_url":"https://api.github.com/repos/fyvfyv/code-and-magick/issues/comments{/number}","contents_url":"https://api.github.com/repos/fyvfyv/code-and-magick/contents/{+path}","compare_url":"https://api.github.com/repos/fyvfyv/code-and-magick/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fyvfyv/code-and-magick/merges","archive_url":"https://api.github.com/repos/fyvfyv/code-and-magick/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fyvfyv/code-and-magick/downloads","issues_url":"https://api.github.com/repos/fyvfyv/code-and-magick/issues{/number}","pulls_url":"https://api.github.com/repos/fyvfyv/code-and-magick/pulls{/number}","milestones_url":"https://api.github.com/repos/fyvfyv/code-and-magick/milestones{/number}","notifications_url":"https://api.github.com/repos/fyvfyv/code-and-magick/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fyvfyv/code-and-magick/labels{/name}","releases_url":"https://api.github.com/repos/fyvfyv/code-and-magick/releases{/id}","deployments_url":"https://api.github.com/repos/fyvfyv/code-and-magick/deployments","created_at":"2016-03-22T18:52:07Z","updated_at":"2016-04-11T20:31:58Z","pushed_at":"2016-05-02T19:37:08Z","git_url":"git://github.com/fyvfyv/code-and-magick.git","ssh_url":"git@github.com:fyvfyv/code-and-magick.git","clone_url":"https://github.com/fyvfyv/code-and-magick.git","svn_url":"https://github.com/fyvfyv/code-and-magick","homepage":null,"size":1099,"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":"8fc5ee511f2d4da611cb3c1fb4c570a9dd3524c0","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":54500257,"name":"42390-code-and-magick","full_name":"htmlacademy-javascript/42390-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/42390-code-and-magick","description":"Олег Петров","fork":false,"url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick","forks_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/forks","keys_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/keys{/key_id}","collaborators_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/teams","hooks_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/hooks","issue_events_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/issues/events{/number}","events_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/events","assignees_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/assignees{/user}","branches_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/branches{/branch}","tags_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/tags","blobs_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/git/refs{/sha}","trees_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/git/trees{/sha}","statuses_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/statuses/{sha}","languages_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/languages","stargazers_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/stargazers","contributors_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/contributors","subscribers_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/subscribers","subscription_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/subscription","commits_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/commits{/sha}","git_commits_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/git/commits{/sha}","comments_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/comments{/number}","issue_comment_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/issues/comments{/number}","contents_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/contents/{+path}","compare_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/compare/{base}...{head}","merges_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/merges","archive_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/downloads","issues_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/issues{/number}","pulls_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/pulls{/number}","milestones_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/milestones{/number}","notifications_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/labels{/name}","releases_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/releases{/id}","deployments_url":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/deployments","created_at":"2016-03-22T18:45:29Z","updated_at":"2016-04-11T20:52:13Z","pushed_at":"2016-05-02T19:37:08Z","git_url":"git://github.com/htmlacademy-javascript/42390-code-and-magick.git","ssh_url":"git@github.com:htmlacademy-javascript/42390-code-and-magick.git","clone_url":"https://github.com/htmlacademy-javascript/42390-code-and-magick.git","svn_url":"https://github.com/htmlacademy-javascript/42390-code-and-magick","homepage":"https://github.com/fyvfyv/code-and-magick","size":1185,"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/42390-code-and-magick/pulls/20"},"html":{"href":"https://github.com/htmlacademy-javascript/42390-code-and-magick/pull/20"},"issue":{"href":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/issues/20"},"comments":{"href":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/htmlacademy-javascript/42390-code-and-magick/statuses/dbc9cfd6d7a7df58d26f542132fdd9b69e9d409c"}}}}