{"action":"created","comment":{"url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/pulls/comments/84594776","pull_request_review_id":5364119,"id":84594776,"diff_hunk":"@@ -253,6 +256,21 @@\n   filterForm.onsubmit = function(evt) {\n     evt.preventDefault();\n \n+    var checkedFilter = document.querySelector('input[name=upload-filter]:checked').value;\n+\n+    var ONE_DAY = (1000 * 60 * 60 * 24);\n+    var now = new Date();\n+    var grace = new Date(now.getFullYear(), 11, 9);\n+    var currentYear = now.getFullYear();\n+\n+    if (now - grace > 0) {\n+      grace.setFullYear(currentYear);\n+    } else {\n+      grace.setFullYear(currentYear - 1);\n+    }\n+\n+    Cookies.set('upload-filter', checkedFilter, {expires: (now - grace) * ONE_DAY});","path":"src/js/upload.js","position":27,"original_position":27,"commit_id":"fe0a236b068b61d9f9de5a16ae817f95a3a108e6","original_commit_id":"fe0a236b068b61d9f9de5a16ae817f95a3a108e6","user":{"login":"Stotyka","id":18396067,"avatar_url":"https://avatars.githubusercontent.com/u/18396067?v=3","gravatar_id":"","url":"https://api.github.com/users/Stotyka","html_url":"https://github.com/Stotyka","followers_url":"https://api.github.com/users/Stotyka/followers","following_url":"https://api.github.com/users/Stotyka/following{/other_user}","gists_url":"https://api.github.com/users/Stotyka/gists{/gist_id}","starred_url":"https://api.github.com/users/Stotyka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stotyka/subscriptions","organizations_url":"https://api.github.com/users/Stotyka/orgs","repos_url":"https://api.github.com/users/Stotyka/repos","events_url":"https://api.github.com/users/Stotyka/events{/privacy}","received_events_url":"https://api.github.com/users/Stotyka/received_events","type":"User","site_admin":false},"body":"Почему-то не работает expires. Значение считает, но не упоминается в уже записанной куке (Expires — Session).","created_at":"2016-10-23T11:59:10Z","updated_at":"2016-10-23T11:59:10Z","html_url":"https://github.com/htmlacademy-javascript/67126-kekstagram/pull/7#discussion_r84594776","pull_request_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/pulls/7","_links":{"self":{"href":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/pulls/comments/84594776"},"html":{"href":"https://github.com/htmlacademy-javascript/67126-kekstagram/pull/7#discussion_r84594776"},"pull_request":{"href":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/pulls/7"}}},"pull_request":{"url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/pulls/7","id":90513022,"html_url":"https://github.com/htmlacademy-javascript/67126-kekstagram/pull/7","diff_url":"https://github.com/htmlacademy-javascript/67126-kekstagram/pull/7.diff","patch_url":"https://github.com/htmlacademy-javascript/67126-kekstagram/pull/7.patch","issue_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/issues/7","number":7,"state":"open","locked":false,"title":"Cookies","user":{"login":"Stotyka","id":18396067,"avatar_url":"https://avatars.githubusercontent.com/u/18396067?v=3","gravatar_id":"","url":"https://api.github.com/users/Stotyka","html_url":"https://github.com/Stotyka","followers_url":"https://api.github.com/users/Stotyka/followers","following_url":"https://api.github.com/users/Stotyka/following{/other_user}","gists_url":"https://api.github.com/users/Stotyka/gists{/gist_id}","starred_url":"https://api.github.com/users/Stotyka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stotyka/subscriptions","organizations_url":"https://api.github.com/users/Stotyka/orgs","repos_url":"https://api.github.com/users/Stotyka/repos","events_url":"https://api.github.com/users/Stotyka/events{/privacy}","received_events_url":"https://api.github.com/users/Stotyka/received_events","type":"User","site_admin":false},"body":"Создание cookie «Последний выбранный фильтр»","created_at":"2016-10-23T11:54:21Z","updated_at":"2016-10-23T11:59:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4099fa7a46b2ea9b97fa3e1d5a26d7239b8a1b39","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/pulls/7/commits","review_comments_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/pulls/7/comments","review_comment_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/pulls/comments{/number}","comments_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/issues/7/comments","statuses_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/statuses/fe0a236b068b61d9f9de5a16ae817f95a3a108e6","head":{"label":"Stotyka:module3-task2","ref":"module3-task2","sha":"fe0a236b068b61d9f9de5a16ae817f95a3a108e6","user":{"login":"Stotyka","id":18396067,"avatar_url":"https://avatars.githubusercontent.com/u/18396067?v=3","gravatar_id":"","url":"https://api.github.com/users/Stotyka","html_url":"https://github.com/Stotyka","followers_url":"https://api.github.com/users/Stotyka/followers","following_url":"https://api.github.com/users/Stotyka/following{/other_user}","gists_url":"https://api.github.com/users/Stotyka/gists{/gist_id}","starred_url":"https://api.github.com/users/Stotyka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stotyka/subscriptions","organizations_url":"https://api.github.com/users/Stotyka/orgs","repos_url":"https://api.github.com/users/Stotyka/repos","events_url":"https://api.github.com/users/Stotyka/events{/privacy}","received_events_url":"https://api.github.com/users/Stotyka/received_events","type":"User","site_admin":false},"repo":{"id":70088919,"name":"67126-kekstagram-1","full_name":"Stotyka/67126-kekstagram-1","owner":{"login":"Stotyka","id":18396067,"avatar_url":"https://avatars.githubusercontent.com/u/18396067?v=3","gravatar_id":"","url":"https://api.github.com/users/Stotyka","html_url":"https://github.com/Stotyka","followers_url":"https://api.github.com/users/Stotyka/followers","following_url":"https://api.github.com/users/Stotyka/following{/other_user}","gists_url":"https://api.github.com/users/Stotyka/gists{/gist_id}","starred_url":"https://api.github.com/users/Stotyka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Stotyka/subscriptions","organizations_url":"https://api.github.com/users/Stotyka/orgs","repos_url":"https://api.github.com/users/Stotyka/repos","events_url":"https://api.github.com/users/Stotyka/events{/privacy}","received_events_url":"https://api.github.com/users/Stotyka/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Stotyka/67126-kekstagram-1","description":"Yuriy Stotyka","fork":true,"url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1","forks_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/forks","keys_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/teams","hooks_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/hooks","issue_events_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/issues/events{/number}","events_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/events","assignees_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/assignees{/user}","branches_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/branches{/branch}","tags_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/tags","blobs_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/statuses/{sha}","languages_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/languages","stargazers_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/stargazers","contributors_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/contributors","subscribers_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/subscribers","subscription_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/subscription","commits_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/contents/{+path}","compare_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/merges","archive_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/downloads","issues_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/issues{/number}","pulls_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/pulls{/number}","milestones_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/milestones{/number}","notifications_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/labels{/name}","releases_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/releases{/id}","deployments_url":"https://api.github.com/repos/Stotyka/67126-kekstagram-1/deployments","created_at":"2016-10-05T18:46:51Z","updated_at":"2016-10-05T18:46:53Z","pushed_at":"2016-10-23T11:53:27Z","git_url":"git://github.com/Stotyka/67126-kekstagram-1.git","ssh_url":"git@github.com:Stotyka/67126-kekstagram-1.git","clone_url":"https://github.com/Stotyka/67126-kekstagram-1.git","svn_url":"https://github.com/Stotyka/67126-kekstagram-1","homepage":null,"size":4314,"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":"5f3718b0b1318c4754e24780679e2553073ff041","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":70035535,"name":"67126-kekstagram","full_name":"htmlacademy-javascript/67126-kekstagram","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/67126-kekstagram","description":"Yuriy Stotyka","fork":false,"url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram","forks_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/forks","keys_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/keys{/key_id}","collaborators_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/teams","hooks_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/hooks","issue_events_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/issues/events{/number}","events_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/events","assignees_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/assignees{/user}","branches_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/branches{/branch}","tags_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/tags","blobs_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/git/refs{/sha}","trees_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/git/trees{/sha}","statuses_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/statuses/{sha}","languages_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/languages","stargazers_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/stargazers","contributors_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/contributors","subscribers_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/subscribers","subscription_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/subscription","commits_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/commits{/sha}","git_commits_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/git/commits{/sha}","comments_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/comments{/number}","issue_comment_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/issues/comments{/number}","contents_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/contents/{+path}","compare_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/compare/{base}...{head}","merges_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/merges","archive_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/downloads","issues_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/issues{/number}","pulls_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/pulls{/number}","milestones_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/milestones{/number}","notifications_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/labels{/name}","releases_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/releases{/id}","deployments_url":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/deployments","created_at":"2016-10-05T06:32:15Z","updated_at":"2016-10-06T13:32:30Z","pushed_at":"2016-10-23T11:54:21Z","git_url":"git://github.com/htmlacademy-javascript/67126-kekstagram.git","ssh_url":"git@github.com:htmlacademy-javascript/67126-kekstagram.git","clone_url":"https://github.com/htmlacademy-javascript/67126-kekstagram.git","svn_url":"https://github.com/htmlacademy-javascript/67126-kekstagram","homepage":"https://github.com/Stotyka/67126-kekstagram-1","size":4393,"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/67126-kekstagram/pulls/7"},"html":{"href":"https://github.com/htmlacademy-javascript/67126-kekstagram/pull/7"},"issue":{"href":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/issues/7"},"comments":{"href":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/htmlacademy-javascript/67126-kekstagram/statuses/fe0a236b068b61d9f9de5a16ae817f95a3a108e6"}}}}
{"actor":{"display_login":"Stotyka"}}