{"action":"created","comment":{"url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/pulls/comments/66410563","id":66410563,"diff_hunk":"@@ -0,0 +1,100 @@\n+'use strict';\n+\n+// var reviews = [];\n+\n+// var __reviewsLoadCallback = function(data) {\n+//   reviews = data;\n+//   return reviews;\n+// };\n+\n+// var getJsonpRequest = function(source, loadCallback) {\n+//   var scriptRequest = document.createElement('script');\n+//   scriptRequest.src = source;\n+//   document.body.appendChild(scriptRequest);\n+// };\n+\n+// getJsonpRequest('//up.htmlacademy.ru/assets/js_intensive/jsonp/reviews.js', __reviewsLoadCallback);\n+\n+\n+(function() {\n+  var filter = document.querySelector('.reviews-filter');\n+  var reviewsContainter = document.querySelector('.reviews-list');\n+  var templateElement = document.querySelector('#review-template');\n+  var elementToClone;\n+  var IMAGE_LOAD_TIMEOUT = 10000;\n+  var IMAGE_WIDTH = 124;\n+  var IMAGE_HEIGTH = 124;\n+\n+  filter.classList.add('invisible');\n+\n+  if ('content' in templateElement) {\n+    elementToClone = templateElement.content.querySelector('.review');\n+  } else {\n+    elementToClone = templateElement.querySelector('.review');\n+  }\n+\n+  /**\n+   * Добавление нового изображения.\n+   * @param  {string}   imageUrl Путь изображения.\n+   * @param  {Function} callback\n+   */\n+  function loadImage(imageUrl, callback) {\n+    var authorImage = new Image();\n+\n+    authorImage.onload = function() {\n+      clearTimeout(imageLoadTimeout);\n+      callback(true);\n+    };\n+\n+    authorImage.onerror = function() {\n+      callback(false);\n+    };\n+\n+    authorImage.src = imageUrl;\n+\n+    var imageLoadTimeout = setTimeout(function() {\n+      callback(false);\n+    }, IMAGE_LOAD_TIMEOUT);\n+  }\n+\n+\n+  /**\n+   * Сборка и добавление отзыва.\n+   * @param  {obj} data Объект который нужно добавить.\n+   * @param  {obj} container Контейнер, в который нужно добавить отзыв.\n+   */\n+  var getReviewsElement = function(data, container) {\n+    var element = elementToClone.cloneNode(true);\n+    var image = element.querySelector('.review-author');","path":"src/reviews.js","position":68,"original_position":68,"commit_id":"b3cba6c69f9faa34f451f2d679dc40c083ab8872","original_commit_id":"b3cba6c69f9faa34f451f2d679dc40c083ab8872","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-06-09T09:39:25Z","updated_at":"2016-06-09T09:39:25Z","html_url":"https://github.com/htmlacademy-javascript/125911-code-and-magick/pull/7#discussion_r66410563","pull_request_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/pulls/comments/66410563"},"html":{"href":"https://github.com/htmlacademy-javascript/125911-code-and-magick/pull/7#discussion_r66410563"},"pull_request":{"href":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/pulls/7","id":73088137,"html_url":"https://github.com/htmlacademy-javascript/125911-code-and-magick/pull/7","diff_url":"https://github.com/htmlacademy-javascript/125911-code-and-magick/pull/7.diff","patch_url":"https://github.com/htmlacademy-javascript/125911-code-and-magick/pull/7.patch","issue_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/issues/7","number":7,"state":"open","locked":false,"title":"Шаблонизируй это!","user":{"login":"mozolev","id":15260025,"avatar_url":"https://avatars.githubusercontent.com/u/15260025?v=3","gravatar_id":"","url":"https://api.github.com/users/mozolev","html_url":"https://github.com/mozolev","followers_url":"https://api.github.com/users/mozolev/followers","following_url":"https://api.github.com/users/mozolev/following{/other_user}","gists_url":"https://api.github.com/users/mozolev/gists{/gist_id}","starred_url":"https://api.github.com/users/mozolev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozolev/subscriptions","organizations_url":"https://api.github.com/users/mozolev/orgs","repos_url":"https://api.github.com/users/mozolev/repos","events_url":"https://api.github.com/users/mozolev/events{/privacy}","received_events_url":"https://api.github.com/users/mozolev/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-08T17:32:14Z","updated_at":"2016-06-09T09:39:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5d81056e4093d9922dfba6416803211d24f82b3f","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/125911-code-and-magick/pulls/7/commits","review_comments_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/pulls/7/comments","review_comment_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/pulls/comments{/number}","comments_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/issues/7/comments","statuses_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/statuses/b3cba6c69f9faa34f451f2d679dc40c083ab8872","head":{"label":"mozolev:module4-task1","ref":"module4-task1","sha":"b3cba6c69f9faa34f451f2d679dc40c083ab8872","user":{"login":"mozolev","id":15260025,"avatar_url":"https://avatars.githubusercontent.com/u/15260025?v=3","gravatar_id":"","url":"https://api.github.com/users/mozolev","html_url":"https://github.com/mozolev","followers_url":"https://api.github.com/users/mozolev/followers","following_url":"https://api.github.com/users/mozolev/following{/other_user}","gists_url":"https://api.github.com/users/mozolev/gists{/gist_id}","starred_url":"https://api.github.com/users/mozolev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozolev/subscriptions","organizations_url":"https://api.github.com/users/mozolev/orgs","repos_url":"https://api.github.com/users/mozolev/repos","events_url":"https://api.github.com/users/mozolev/events{/privacy}","received_events_url":"https://api.github.com/users/mozolev/received_events","type":"User","site_admin":false},"repo":{"id":59600784,"name":"125911-code-and-magick","full_name":"mozolev/125911-code-and-magick","owner":{"login":"mozolev","id":15260025,"avatar_url":"https://avatars.githubusercontent.com/u/15260025?v=3","gravatar_id":"","url":"https://api.github.com/users/mozolev","html_url":"https://github.com/mozolev","followers_url":"https://api.github.com/users/mozolev/followers","following_url":"https://api.github.com/users/mozolev/following{/other_user}","gists_url":"https://api.github.com/users/mozolev/gists{/gist_id}","starred_url":"https://api.github.com/users/mozolev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozolev/subscriptions","organizations_url":"https://api.github.com/users/mozolev/orgs","repos_url":"https://api.github.com/users/mozolev/repos","events_url":"https://api.github.com/users/mozolev/events{/privacy}","received_events_url":"https://api.github.com/users/mozolev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mozolev/125911-code-and-magick","description":"Andrey Mozolev","fork":true,"url":"https://api.github.com/repos/mozolev/125911-code-and-magick","forks_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/forks","keys_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/teams","hooks_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/hooks","issue_events_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/issues/events{/number}","events_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/events","assignees_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/assignees{/user}","branches_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/branches{/branch}","tags_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/tags","blobs_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/statuses/{sha}","languages_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/languages","stargazers_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/stargazers","contributors_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/contributors","subscribers_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/subscribers","subscription_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/subscription","commits_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/contents/{+path}","compare_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/merges","archive_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/downloads","issues_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/issues{/number}","pulls_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/pulls{/number}","milestones_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/milestones{/number}","notifications_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/labels{/name}","releases_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/releases{/id}","deployments_url":"https://api.github.com/repos/mozolev/125911-code-and-magick/deployments","created_at":"2016-05-24T19:05:52Z","updated_at":"2016-05-24T19:05:53Z","pushed_at":"2016-06-09T07:48:08Z","git_url":"git://github.com/mozolev/125911-code-and-magick.git","ssh_url":"git@github.com:mozolev/125911-code-and-magick.git","clone_url":"https://github.com/mozolev/125911-code-and-magick.git","svn_url":"https://github.com/mozolev/125911-code-and-magick","homepage":null,"size":1064,"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":"f9b2811c4ec3593cd9afde839ba985e555b9d94c","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":59600760,"name":"125911-code-and-magick","full_name":"htmlacademy-javascript/125911-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/125911-code-and-magick","description":"Andrey Mozolev","fork":false,"url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick","forks_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/forks","keys_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/keys{/key_id}","collaborators_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/teams","hooks_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/hooks","issue_events_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/issues/events{/number}","events_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/events","assignees_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/assignees{/user}","branches_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/branches{/branch}","tags_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/tags","blobs_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/git/refs{/sha}","trees_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/git/trees{/sha}","statuses_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/statuses/{sha}","languages_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/languages","stargazers_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/stargazers","contributors_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/contributors","subscribers_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/subscribers","subscription_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/subscription","commits_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/commits{/sha}","git_commits_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/git/commits{/sha}","comments_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/comments{/number}","issue_comment_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/issues/comments{/number}","contents_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/contents/{+path}","compare_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/compare/{base}...{head}","merges_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/merges","archive_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/downloads","issues_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/issues{/number}","pulls_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/pulls{/number}","milestones_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/milestones{/number}","notifications_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/labels{/name}","releases_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/releases{/id}","deployments_url":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/deployments","created_at":"2016-05-24T19:05:35Z","updated_at":"2016-05-24T19:32:03Z","pushed_at":"2016-06-09T07:48:09Z","git_url":"git://github.com/htmlacademy-javascript/125911-code-and-magick.git","ssh_url":"git@github.com:htmlacademy-javascript/125911-code-and-magick.git","clone_url":"https://github.com/htmlacademy-javascript/125911-code-and-magick.git","svn_url":"https://github.com/htmlacademy-javascript/125911-code-and-magick","homepage":"https://github.com/mozolev/125911-code-and-magick","size":1084,"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/125911-code-and-magick/pulls/7"},"html":{"href":"https://github.com/htmlacademy-javascript/125911-code-and-magick/pull/7"},"issue":{"href":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/issues/7"},"comments":{"href":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/htmlacademy-javascript/125911-code-and-magick/statuses/b3cba6c69f9faa34f451f2d679dc40c083ab8872"}}}}
{"actor":{"display_login":"isqua"}}