{"action":"created","comment":{"url":"https://api.github.com/repos/mruminski/92/pulls/comments/211404366","pull_request_review_id":147817973,"id":211404366,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMTQwNDM2Ng==","diff_hunk":"@@ -0,0 +1,70 @@\n+'use strict';\n+(function(){ \n+\t/* W kodzie HTML i CSS dodaliśmy style dla prostego modala, który będzie zawsze wyśrodkowany w oknie. \n+\t\n+\tTeraz wystarczy napisać funkcję otwierającą modal:\n+\t*/\n+\t\n+\tvar removeClass = function(selector, remove) {\n+\t\tvar array = document.querySelectorAll(selector);\n+\t\tfor (var i = 0; i < array.length; i++) {\n+\t\t\tarray[i].classList.remove(remove);\n+\t\t}\n+\t}\n+\n+\tvar addClass = function(selector, append) {\n+\t\tvar attribute = selector.getAttribute(\"href\");\n+\t\tdocument.querySelector(attribute).classList.add(append);\n+\t};\n+\t\n+\tvar showModal = function(event){\n+\t\tevent.preventDefault();\n+\n+\t\tremoveClass('.modal','show')\n+\t\taddClass(event.target, \"show\");\n+\n+\t\tdocument.querySelector('#modal-overlay').classList.add('show');\n+\t};\n+\t\n+\t// Mimo, że obecnie mamy tylko jeden link, stosujemy kod dla wielu linków. W ten sposób nie będzie trzeba go zmieniać, kiedy zechcemy mieć więcej linków lub guzików otwierających modale\n+\t\n+\tvar modalLinks = document.querySelectorAll('.show-modal');\n+\t\n+\tfor(var i = 0; i < modalLinks.length; i++){\n+\t\tmodalLinks[i].addEventListener('click', showModal);\n+\t}\n+\t\n+\t// Dodajemy też funkcję zamykającą modal, oraz przywiązujemy ją do kliknięć na elemencie z klasą \"close\". ","path":"js/script.js","position":37,"original_position":37,"commit_id":"e8cee45e8be34c4583ed64aef535f8a397075182","original_commit_id":"e8cee45e8be34c4583ed64aef535f8a397075182","user":{"login":"matwjablonski","id":20933197,"node_id":"MDQ6VXNlcjIwOTMzMTk3","avatar_url":"https://avatars3.githubusercontent.com/u/20933197?v=4","gravatar_id":"","url":"https://api.github.com/users/matwjablonski","html_url":"https://github.com/matwjablonski","followers_url":"https://api.github.com/users/matwjablonski/followers","following_url":"https://api.github.com/users/matwjablonski/following{/other_user}","gists_url":"https://api.github.com/users/matwjablonski/gists{/gist_id}","starred_url":"https://api.github.com/users/matwjablonski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matwjablonski/subscriptions","organizations_url":"https://api.github.com/users/matwjablonski/orgs","repos_url":"https://api.github.com/users/matwjablonski/repos","events_url":"https://api.github.com/users/matwjablonski/events{/privacy}","received_events_url":"https://api.github.com/users/matwjablonski/received_events","type":"User","site_admin":false},"body":"english","created_at":"2018-08-20T20:55:04Z","updated_at":"2018-08-20T20:56:42Z","html_url":"https://github.com/mruminski/92/pull/1#discussion_r211404366","pull_request_url":"https://api.github.com/repos/mruminski/92/pulls/1","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/mruminski/92/pulls/comments/211404366"},"html":{"href":"https://github.com/mruminski/92/pull/1#discussion_r211404366"},"pull_request":{"href":"https://api.github.com/repos/mruminski/92/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/mruminski/92/pulls/1","id":209315589,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5MzE1NTg5","html_url":"https://github.com/mruminski/92/pull/1","diff_url":"https://github.com/mruminski/92/pull/1.diff","patch_url":"https://github.com/mruminski/92/pull/1.patch","issue_url":"https://api.github.com/repos/mruminski/92/issues/1","number":1,"state":"open","locked":false,"title":"task 9.2","user":{"login":"mruminski","id":11890928,"node_id":"MDQ6VXNlcjExODkwOTI4","avatar_url":"https://avatars1.githubusercontent.com/u/11890928?v=4","gravatar_id":"","url":"https://api.github.com/users/mruminski","html_url":"https://github.com/mruminski","followers_url":"https://api.github.com/users/mruminski/followers","following_url":"https://api.github.com/users/mruminski/following{/other_user}","gists_url":"https://api.github.com/users/mruminski/gists{/gist_id}","starred_url":"https://api.github.com/users/mruminski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mruminski/subscriptions","organizations_url":"https://api.github.com/users/mruminski/orgs","repos_url":"https://api.github.com/users/mruminski/repos","events_url":"https://api.github.com/users/mruminski/events{/privacy}","received_events_url":"https://api.github.com/users/mruminski/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-08-18T14:55:55Z","updated_at":"2018-08-20T20:56:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c5912adb84665cd9a6b9c7096871d64a1f59e6f7","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mruminski/92/pulls/1/commits","review_comments_url":"https://api.github.com/repos/mruminski/92/pulls/1/comments","review_comment_url":"https://api.github.com/repos/mruminski/92/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mruminski/92/issues/1/comments","statuses_url":"https://api.github.com/repos/mruminski/92/statuses/e8cee45e8be34c4583ed64aef535f8a397075182","head":{"label":"mruminski:dev","ref":"dev","sha":"e8cee45e8be34c4583ed64aef535f8a397075182","user":{"login":"mruminski","id":11890928,"node_id":"MDQ6VXNlcjExODkwOTI4","avatar_url":"https://avatars1.githubusercontent.com/u/11890928?v=4","gravatar_id":"","url":"https://api.github.com/users/mruminski","html_url":"https://github.com/mruminski","followers_url":"https://api.github.com/users/mruminski/followers","following_url":"https://api.github.com/users/mruminski/following{/other_user}","gists_url":"https://api.github.com/users/mruminski/gists{/gist_id}","starred_url":"https://api.github.com/users/mruminski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mruminski/subscriptions","organizations_url":"https://api.github.com/users/mruminski/orgs","repos_url":"https://api.github.com/users/mruminski/repos","events_url":"https://api.github.com/users/mruminski/events{/privacy}","received_events_url":"https://api.github.com/users/mruminski/received_events","type":"User","site_admin":false},"repo":{"id":145013786,"node_id":"MDEwOlJlcG9zaXRvcnkxNDUwMTM3ODY=","name":"92","full_name":"mruminski/92","owner":{"login":"mruminski","id":11890928,"node_id":"MDQ6VXNlcjExODkwOTI4","avatar_url":"https://avatars1.githubusercontent.com/u/11890928?v=4","gravatar_id":"","url":"https://api.github.com/users/mruminski","html_url":"https://github.com/mruminski","followers_url":"https://api.github.com/users/mruminski/followers","following_url":"https://api.github.com/users/mruminski/following{/other_user}","gists_url":"https://api.github.com/users/mruminski/gists{/gist_id}","starred_url":"https://api.github.com/users/mruminski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mruminski/subscriptions","organizations_url":"https://api.github.com/users/mruminski/orgs","repos_url":"https://api.github.com/users/mruminski/repos","events_url":"https://api.github.com/users/mruminski/events{/privacy}","received_events_url":"https://api.github.com/users/mruminski/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mruminski/92","description":null,"fork":false,"url":"https://api.github.com/repos/mruminski/92","forks_url":"https://api.github.com/repos/mruminski/92/forks","keys_url":"https://api.github.com/repos/mruminski/92/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mruminski/92/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mruminski/92/teams","hooks_url":"https://api.github.com/repos/mruminski/92/hooks","issue_events_url":"https://api.github.com/repos/mruminski/92/issues/events{/number}","events_url":"https://api.github.com/repos/mruminski/92/events","assignees_url":"https://api.github.com/repos/mruminski/92/assignees{/user}","branches_url":"https://api.github.com/repos/mruminski/92/branches{/branch}","tags_url":"https://api.github.com/repos/mruminski/92/tags","blobs_url":"https://api.github.com/repos/mruminski/92/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mruminski/92/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mruminski/92/git/refs{/sha}","trees_url":"https://api.github.com/repos/mruminski/92/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mruminski/92/statuses/{sha}","languages_url":"https://api.github.com/repos/mruminski/92/languages","stargazers_url":"https://api.github.com/repos/mruminski/92/stargazers","contributors_url":"https://api.github.com/repos/mruminski/92/contributors","subscribers_url":"https://api.github.com/repos/mruminski/92/subscribers","subscription_url":"https://api.github.com/repos/mruminski/92/subscription","commits_url":"https://api.github.com/repos/mruminski/92/commits{/sha}","git_commits_url":"https://api.github.com/repos/mruminski/92/git/commits{/sha}","comments_url":"https://api.github.com/repos/mruminski/92/comments{/number}","issue_comment_url":"https://api.github.com/repos/mruminski/92/issues/comments{/number}","contents_url":"https://api.github.com/repos/mruminski/92/contents/{+path}","compare_url":"https://api.github.com/repos/mruminski/92/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mruminski/92/merges","archive_url":"https://api.github.com/repos/mruminski/92/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mruminski/92/downloads","issues_url":"https://api.github.com/repos/mruminski/92/issues{/number}","pulls_url":"https://api.github.com/repos/mruminski/92/pulls{/number}","milestones_url":"https://api.github.com/repos/mruminski/92/milestones{/number}","notifications_url":"https://api.github.com/repos/mruminski/92/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mruminski/92/labels{/name}","releases_url":"https://api.github.com/repos/mruminski/92/releases{/id}","deployments_url":"https://api.github.com/repos/mruminski/92/deployments","created_at":"2018-08-16T16:30:20Z","updated_at":"2018-08-16T16:35:36Z","pushed_at":"2018-08-18T14:55:55Z","git_url":"git://github.com/mruminski/92.git","ssh_url":"git@github.com:mruminski/92.git","clone_url":"https://github.com/mruminski/92.git","svn_url":"https://github.com/mruminski/92","homepage":null,"size":45,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"mruminski:master","ref":"master","sha":"69bb892f6dfa0d1f85be7c5280a04ead3c1a35b2","user":{"login":"mruminski","id":11890928,"node_id":"MDQ6VXNlcjExODkwOTI4","avatar_url":"https://avatars1.githubusercontent.com/u/11890928?v=4","gravatar_id":"","url":"https://api.github.com/users/mruminski","html_url":"https://github.com/mruminski","followers_url":"https://api.github.com/users/mruminski/followers","following_url":"https://api.github.com/users/mruminski/following{/other_user}","gists_url":"https://api.github.com/users/mruminski/gists{/gist_id}","starred_url":"https://api.github.com/users/mruminski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mruminski/subscriptions","organizations_url":"https://api.github.com/users/mruminski/orgs","repos_url":"https://api.github.com/users/mruminski/repos","events_url":"https://api.github.com/users/mruminski/events{/privacy}","received_events_url":"https://api.github.com/users/mruminski/received_events","type":"User","site_admin":false},"repo":{"id":145013786,"node_id":"MDEwOlJlcG9zaXRvcnkxNDUwMTM3ODY=","name":"92","full_name":"mruminski/92","owner":{"login":"mruminski","id":11890928,"node_id":"MDQ6VXNlcjExODkwOTI4","avatar_url":"https://avatars1.githubusercontent.com/u/11890928?v=4","gravatar_id":"","url":"https://api.github.com/users/mruminski","html_url":"https://github.com/mruminski","followers_url":"https://api.github.com/users/mruminski/followers","following_url":"https://api.github.com/users/mruminski/following{/other_user}","gists_url":"https://api.github.com/users/mruminski/gists{/gist_id}","starred_url":"https://api.github.com/users/mruminski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mruminski/subscriptions","organizations_url":"https://api.github.com/users/mruminski/orgs","repos_url":"https://api.github.com/users/mruminski/repos","events_url":"https://api.github.com/users/mruminski/events{/privacy}","received_events_url":"https://api.github.com/users/mruminski/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mruminski/92","description":null,"fork":false,"url":"https://api.github.com/repos/mruminski/92","forks_url":"https://api.github.com/repos/mruminski/92/forks","keys_url":"https://api.github.com/repos/mruminski/92/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mruminski/92/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mruminski/92/teams","hooks_url":"https://api.github.com/repos/mruminski/92/hooks","issue_events_url":"https://api.github.com/repos/mruminski/92/issues/events{/number}","events_url":"https://api.github.com/repos/mruminski/92/events","assignees_url":"https://api.github.com/repos/mruminski/92/assignees{/user}","branches_url":"https://api.github.com/repos/mruminski/92/branches{/branch}","tags_url":"https://api.github.com/repos/mruminski/92/tags","blobs_url":"https://api.github.com/repos/mruminski/92/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mruminski/92/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mruminski/92/git/refs{/sha}","trees_url":"https://api.github.com/repos/mruminski/92/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mruminski/92/statuses/{sha}","languages_url":"https://api.github.com/repos/mruminski/92/languages","stargazers_url":"https://api.github.com/repos/mruminski/92/stargazers","contributors_url":"https://api.github.com/repos/mruminski/92/contributors","subscribers_url":"https://api.github.com/repos/mruminski/92/subscribers","subscription_url":"https://api.github.com/repos/mruminski/92/subscription","commits_url":"https://api.github.com/repos/mruminski/92/commits{/sha}","git_commits_url":"https://api.github.com/repos/mruminski/92/git/commits{/sha}","comments_url":"https://api.github.com/repos/mruminski/92/comments{/number}","issue_comment_url":"https://api.github.com/repos/mruminski/92/issues/comments{/number}","contents_url":"https://api.github.com/repos/mruminski/92/contents/{+path}","compare_url":"https://api.github.com/repos/mruminski/92/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mruminski/92/merges","archive_url":"https://api.github.com/repos/mruminski/92/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mruminski/92/downloads","issues_url":"https://api.github.com/repos/mruminski/92/issues{/number}","pulls_url":"https://api.github.com/repos/mruminski/92/pulls{/number}","milestones_url":"https://api.github.com/repos/mruminski/92/milestones{/number}","notifications_url":"https://api.github.com/repos/mruminski/92/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mruminski/92/labels{/name}","releases_url":"https://api.github.com/repos/mruminski/92/releases{/id}","deployments_url":"https://api.github.com/repos/mruminski/92/deployments","created_at":"2018-08-16T16:30:20Z","updated_at":"2018-08-16T16:35:36Z","pushed_at":"2018-08-18T14:55:55Z","git_url":"git://github.com/mruminski/92.git","ssh_url":"git@github.com:mruminski/92.git","clone_url":"https://github.com/mruminski/92.git","svn_url":"https://github.com/mruminski/92","homepage":null,"size":45,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mruminski/92/pulls/1"},"html":{"href":"https://github.com/mruminski/92/pull/1"},"issue":{"href":"https://api.github.com/repos/mruminski/92/issues/1"},"comments":{"href":"https://api.github.com/repos/mruminski/92/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/mruminski/92/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/mruminski/92/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mruminski/92/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/mruminski/92/statuses/e8cee45e8be34c4583ed64aef535f8a397075182"}},"author_association":"OWNER"}}
{"actor":{"display_login":"matwjablonski"}}