{"action":"created","comment":{"url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/pulls/comments/168067061","pull_request_review_id":96373938,"id":168067061,"diff_hunk":"@@ -107,8 +112,7 @@ var renderAdvert = function (advert) {\n   advertTemplate.querySelector('p:nth-child(8)').textContent = 'Заезд после ' + advert.offer.checkin + ', выезд до ' + advert.offer.checkout;\n   advertTemplate.querySelector('p:last-of-type').textContent = advert.offer.description;\n   advertTemplate.querySelector('.popup__avatar').src = advert.author.avatar;\n-\n-  document.querySelector('.map').insertBefore(advertTemplate, mapFiltersContainer);\n+  map.insertBefore(advertTemplate, mapFiltersContainer);","path":"js/map.js","position":45,"original_position":45,"commit_id":"6e2303c4d6233d5d54137587aa4d0b66ea3ad0ba","original_commit_id":"6e2303c4d6233d5d54137587aa4d0b66ea3ad0ba","user":{"login":"VsevolodArtemyev","id":14345492,"avatar_url":"https://avatars1.githubusercontent.com/u/14345492?v=4","gravatar_id":"","url":"https://api.github.com/users/VsevolodArtemyev","html_url":"https://github.com/VsevolodArtemyev","followers_url":"https://api.github.com/users/VsevolodArtemyev/followers","following_url":"https://api.github.com/users/VsevolodArtemyev/following{/other_user}","gists_url":"https://api.github.com/users/VsevolodArtemyev/gists{/gist_id}","starred_url":"https://api.github.com/users/VsevolodArtemyev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VsevolodArtemyev/subscriptions","organizations_url":"https://api.github.com/users/VsevolodArtemyev/orgs","repos_url":"https://api.github.com/users/VsevolodArtemyev/repos","events_url":"https://api.github.com/users/VsevolodArtemyev/events{/privacy}","received_events_url":"https://api.github.com/users/VsevolodArtemyev/received_events","type":"User","site_admin":false},"body":"Предлагаю следующий подход. Нужно создать вспомогательный div с классом, например, `advert` и в него добавить заполненный шаблон с объявлением, а потом уже добавлять получившуюся верстку в DOM. И при каждом рендеренге нового объявления нужно удалять старое, которое можно найти через `document.querySelector('.advert')`","created_at":"2018-02-14T03:00:57Z","updated_at":"2018-02-14T03:00:57Z","html_url":"https://github.com/htmlacademy-javascript/329043-keksobooking/pull/3#discussion_r168067061","pull_request_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/pulls/3","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/pulls/comments/168067061"},"html":{"href":"https://github.com/htmlacademy-javascript/329043-keksobooking/pull/3#discussion_r168067061"},"pull_request":{"href":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/pulls/3"}},"in_reply_to_id":168065712},"pull_request":{"url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/pulls/3","id":168420320,"html_url":"https://github.com/htmlacademy-javascript/329043-keksobooking/pull/3","diff_url":"https://github.com/htmlacademy-javascript/329043-keksobooking/pull/3.diff","patch_url":"https://github.com/htmlacademy-javascript/329043-keksobooking/pull/3.patch","issue_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/issues/3","number":3,"state":"open","locked":false,"title":"Личный проект: подробности","user":{"login":"Andkov440","id":25137962,"avatar_url":"https://avatars1.githubusercontent.com/u/25137962?v=4","gravatar_id":"","url":"https://api.github.com/users/Andkov440","html_url":"https://github.com/Andkov440","followers_url":"https://api.github.com/users/Andkov440/followers","following_url":"https://api.github.com/users/Andkov440/following{/other_user}","gists_url":"https://api.github.com/users/Andkov440/gists{/gist_id}","starred_url":"https://api.github.com/users/Andkov440/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Andkov440/subscriptions","organizations_url":"https://api.github.com/users/Andkov440/orgs","repos_url":"https://api.github.com/users/Andkov440/repos","events_url":"https://api.github.com/users/Andkov440/events{/privacy}","received_events_url":"https://api.github.com/users/Andkov440/received_events","type":"User","site_admin":false},"body":"\n\n---\n:mortar_board: [Личный проект: подробности](https://up.htmlacademy.ru/javascript/12/user/329043/tasks/13)\n\n:boom: https://htmlacademy-javascript.github.io/329043-keksobooking/3/","created_at":"2018-02-10T20:51:34Z","updated_at":"2018-02-14T03:00:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b0b9f328168781b668931435841867409f480a35","assignee":{"login":"VsevolodArtemyev","id":14345492,"avatar_url":"https://avatars1.githubusercontent.com/u/14345492?v=4","gravatar_id":"","url":"https://api.github.com/users/VsevolodArtemyev","html_url":"https://github.com/VsevolodArtemyev","followers_url":"https://api.github.com/users/VsevolodArtemyev/followers","following_url":"https://api.github.com/users/VsevolodArtemyev/following{/other_user}","gists_url":"https://api.github.com/users/VsevolodArtemyev/gists{/gist_id}","starred_url":"https://api.github.com/users/VsevolodArtemyev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VsevolodArtemyev/subscriptions","organizations_url":"https://api.github.com/users/VsevolodArtemyev/orgs","repos_url":"https://api.github.com/users/VsevolodArtemyev/repos","events_url":"https://api.github.com/users/VsevolodArtemyev/events{/privacy}","received_events_url":"https://api.github.com/users/VsevolodArtemyev/received_events","type":"User","site_admin":false},"assignees":[{"login":"VsevolodArtemyev","id":14345492,"avatar_url":"https://avatars1.githubusercontent.com/u/14345492?v=4","gravatar_id":"","url":"https://api.github.com/users/VsevolodArtemyev","html_url":"https://github.com/VsevolodArtemyev","followers_url":"https://api.github.com/users/VsevolodArtemyev/followers","following_url":"https://api.github.com/users/VsevolodArtemyev/following{/other_user}","gists_url":"https://api.github.com/users/VsevolodArtemyev/gists{/gist_id}","starred_url":"https://api.github.com/users/VsevolodArtemyev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VsevolodArtemyev/subscriptions","organizations_url":"https://api.github.com/users/VsevolodArtemyev/orgs","repos_url":"https://api.github.com/users/VsevolodArtemyev/repos","events_url":"https://api.github.com/users/VsevolodArtemyev/events{/privacy}","received_events_url":"https://api.github.com/users/VsevolodArtemyev/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/pulls/3/commits","review_comments_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/pulls/3/comments","review_comment_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/pulls/comments{/number}","comments_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/issues/3/comments","statuses_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/statuses/6e2303c4d6233d5d54137587aa4d0b66ea3ad0ba","head":{"label":"Andkov440:module4-task1","ref":"module4-task1","sha":"6e2303c4d6233d5d54137587aa4d0b66ea3ad0ba","user":{"login":"Andkov440","id":25137962,"avatar_url":"https://avatars1.githubusercontent.com/u/25137962?v=4","gravatar_id":"","url":"https://api.github.com/users/Andkov440","html_url":"https://github.com/Andkov440","followers_url":"https://api.github.com/users/Andkov440/followers","following_url":"https://api.github.com/users/Andkov440/following{/other_user}","gists_url":"https://api.github.com/users/Andkov440/gists{/gist_id}","starred_url":"https://api.github.com/users/Andkov440/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Andkov440/subscriptions","organizations_url":"https://api.github.com/users/Andkov440/orgs","repos_url":"https://api.github.com/users/Andkov440/repos","events_url":"https://api.github.com/users/Andkov440/events{/privacy}","received_events_url":"https://api.github.com/users/Andkov440/received_events","type":"User","site_admin":false},"repo":{"id":118652934,"name":"329043-keksobooking","full_name":"Andkov440/329043-keksobooking","owner":{"login":"Andkov440","id":25137962,"avatar_url":"https://avatars1.githubusercontent.com/u/25137962?v=4","gravatar_id":"","url":"https://api.github.com/users/Andkov440","html_url":"https://github.com/Andkov440","followers_url":"https://api.github.com/users/Andkov440/followers","following_url":"https://api.github.com/users/Andkov440/following{/other_user}","gists_url":"https://api.github.com/users/Andkov440/gists{/gist_id}","starred_url":"https://api.github.com/users/Andkov440/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Andkov440/subscriptions","organizations_url":"https://api.github.com/users/Andkov440/orgs","repos_url":"https://api.github.com/users/Andkov440/repos","events_url":"https://api.github.com/users/Andkov440/events{/privacy}","received_events_url":"https://api.github.com/users/Andkov440/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Andkov440/329043-keksobooking","description":"Андрей Ковалев","fork":true,"url":"https://api.github.com/repos/Andkov440/329043-keksobooking","forks_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/forks","keys_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/teams","hooks_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/hooks","issue_events_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/issues/events{/number}","events_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/events","assignees_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/assignees{/user}","branches_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/branches{/branch}","tags_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/tags","blobs_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/git/refs{/sha}","trees_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/statuses/{sha}","languages_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/languages","stargazers_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/stargazers","contributors_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/contributors","subscribers_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/subscribers","subscription_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/subscription","commits_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/commits{/sha}","git_commits_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/git/commits{/sha}","comments_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/comments{/number}","issue_comment_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/issues/comments{/number}","contents_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/contents/{+path}","compare_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/merges","archive_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/downloads","issues_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/issues{/number}","pulls_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/pulls{/number}","milestones_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/milestones{/number}","notifications_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/labels{/name}","releases_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/releases{/id}","deployments_url":"https://api.github.com/repos/Andkov440/329043-keksobooking/deployments","created_at":"2018-01-23T18:41:30Z","updated_at":"2018-01-24T11:19:23Z","pushed_at":"2018-02-13T20:52:42Z","git_url":"git://github.com/Andkov440/329043-keksobooking.git","ssh_url":"git@github.com:Andkov440/329043-keksobooking.git","clone_url":"https://github.com/Andkov440/329043-keksobooking.git","svn_url":"https://github.com/Andkov440/329043-keksobooking","homepage":null,"size":771,"stargazers_count":0,"watchers_count":0,"language":"HTML","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":"449f4ce8af871a89b5061fcb46f9c517d05ff7de","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":118652885,"name":"329043-keksobooking","full_name":"htmlacademy-javascript/329043-keksobooking","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/329043-keksobooking","description":"Андрей Ковалев","fork":false,"url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking","forks_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/forks","keys_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/keys{/key_id}","collaborators_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/teams","hooks_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/hooks","issue_events_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/issues/events{/number}","events_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/events","assignees_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/assignees{/user}","branches_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/branches{/branch}","tags_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/tags","blobs_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/git/refs{/sha}","trees_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/git/trees{/sha}","statuses_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/statuses/{sha}","languages_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/languages","stargazers_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/stargazers","contributors_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/contributors","subscribers_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/subscribers","subscription_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/subscription","commits_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/commits{/sha}","git_commits_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/git/commits{/sha}","comments_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/comments{/number}","issue_comment_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/issues/comments{/number}","contents_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/contents/{+path}","compare_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/compare/{base}...{head}","merges_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/merges","archive_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/downloads","issues_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/issues{/number}","pulls_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/pulls{/number}","milestones_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/milestones{/number}","notifications_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/labels{/name}","releases_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/releases{/id}","deployments_url":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/deployments","created_at":"2018-01-23T18:40:59Z","updated_at":"2018-01-24T11:44:25Z","pushed_at":"2018-02-14T02:44:48Z","git_url":"git://github.com/htmlacademy-javascript/329043-keksobooking.git","ssh_url":"git@github.com:htmlacademy-javascript/329043-keksobooking.git","clone_url":"https://github.com/htmlacademy-javascript/329043-keksobooking.git","svn_url":"https://github.com/htmlacademy-javascript/329043-keksobooking","homepage":"https://github.com/Andkov440/329043-keksobooking","size":789,"stargazers_count":0,"watchers_count":0,"language":"HTML","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/329043-keksobooking/pulls/3"},"html":{"href":"https://github.com/htmlacademy-javascript/329043-keksobooking/pull/3"},"issue":{"href":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/issues/3"},"comments":{"href":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/htmlacademy-javascript/329043-keksobooking/statuses/6e2303c4d6233d5d54137587aa4d0b66ea3ad0ba"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"VsevolodArtemyev"}}