{"action":"created","comment":{"url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/pulls/comments/59991310","id":59991310,"diff_hunk":"@@ -0,0 +1,79 @@\n+var array = new Array();\n+var speed = 10;\n+var timer = 10;\n+\n+// Loop through all the divs in the slider parent div //\n+// Calculate seach content divs height and set it to a variable //\n+function slider(target, showfirst) {\n+    var slider = document.getElementsByClassName(target);\n+    var divs = slider[0].getElementsByTagName('div');\n+    var divslength = divs.length;\n+    for (i = 0; i < divslength; i++) {\n+        var div = divs[i];\n+        var divid = div.id;\n+        if (divid.indexOf(\"header\") != -1) {\n+            div.onclick = new Function(\"processClick(this)\");\n+        } else if (divid.indexOf(\"content\") != -1) {\n+            var section = divid.replace('content-', '');\n+            array.push(section);\n+            div.maxh = div.offsetHeight;\n+            if (showfirst == 1 && i == 1) {\n+                div.style.display = 'block';\n+            } else {\n+                div.style.display = 'none';\n+            }\n+        }\n+    }\n+}\n+\n+// Process the click - expand the selected content and collapse the others //\n+function processClick(div) {\n+    var catlength = array.length;\n+    for (i = 0; i < catlength; i++) {\n+        var section = array[i];\n+        var head = document.getElementById('header-' + section);\n+        var cont =  'content-' + section;\n+        var contdiv = document.getElementById(cont);\n+        clearInterval(contdiv.timer);\n+        if (head == div && contdiv.style.display == 'none') {\n+            contdiv.style.height = '0px';\n+            contdiv.style.display = 'block';\n+            initSlide(cont, 1);\n+        } else if (contdiv.style.display == 'block') {\n+            initSlide(cont, -1);\n+        }\n+    }\n+}\n+\n+// Setup the variables and call the slide function //\n+function initSlide(id, dir) {\n+    var cont = document.getElementById(id);\n+    var maxh = cont.maxh;\n+    cont.direction = dir;\n+    cont.timer = setInterval(\"slide('\" + id + \"')\", timer);","path":"public/js/creatingJS.js","position":53,"original_position":53,"commit_id":"b423112d0ac1d4d382e23aff9d88f90d18e0821e","original_commit_id":"b423112d0ac1d4d382e23aff9d88f90d18e0821e","user":{"login":"ftdebugger","id":170282,"avatar_url":"https://avatars.githubusercontent.com/u/170282?v=3","gravatar_id":"","url":"https://api.github.com/users/ftdebugger","html_url":"https://github.com/ftdebugger","followers_url":"https://api.github.com/users/ftdebugger/followers","following_url":"https://api.github.com/users/ftdebugger/following{/other_user}","gists_url":"https://api.github.com/users/ftdebugger/gists{/gist_id}","starred_url":"https://api.github.com/users/ftdebugger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ftdebugger/subscriptions","organizations_url":"https://api.github.com/users/ftdebugger/orgs","repos_url":"https://api.github.com/users/ftdebugger/repos","events_url":"https://api.github.com/users/ftdebugger/events{/privacy}","received_events_url":"https://api.github.com/users/ftdebugger/received_events","type":"User","site_admin":false},"body":"`setInterval(\"slide('\" + id + \"')\"` это тоже из области `eval`. Eval - зло в чистом виде","created_at":"2016-04-17T19:57:11Z","updated_at":"2016-04-17T19:57:11Z","html_url":"https://github.com/yandex-shri-minsk-2016/lenka-dark-side/pull/8#discussion_r59991310","pull_request_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/pulls/comments/59991310"},"html":{"href":"https://github.com/yandex-shri-minsk-2016/lenka-dark-side/pull/8#discussion_r59991310"},"pull_request":{"href":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/pulls/8"}}},"pull_request":{"url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/pulls/8","id":66749598,"html_url":"https://github.com/yandex-shri-minsk-2016/lenka-dark-side/pull/8","diff_url":"https://github.com/yandex-shri-minsk-2016/lenka-dark-side/pull/8.diff","patch_url":"https://github.com/yandex-shri-minsk-2016/lenka-dark-side/pull/8.patch","issue_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/issues/8","number":8,"state":"open","locked":false,"title":"add creating page, fix index.jade","user":{"login":"Mihlyuk","id":15009009,"avatar_url":"https://avatars.githubusercontent.com/u/15009009?v=3","gravatar_id":"","url":"https://api.github.com/users/Mihlyuk","html_url":"https://github.com/Mihlyuk","followers_url":"https://api.github.com/users/Mihlyuk/followers","following_url":"https://api.github.com/users/Mihlyuk/following{/other_user}","gists_url":"https://api.github.com/users/Mihlyuk/gists{/gist_id}","starred_url":"https://api.github.com/users/Mihlyuk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mihlyuk/subscriptions","organizations_url":"https://api.github.com/users/Mihlyuk/orgs","repos_url":"https://api.github.com/users/Mihlyuk/repos","events_url":"https://api.github.com/users/Mihlyuk/events{/privacy}","received_events_url":"https://api.github.com/users/Mihlyuk/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-16T20:54:45Z","updated_at":"2016-04-17T19:57:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7c2a009cda960d5763235ae1ca3ac292b07bde44","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/pulls/8/commits","review_comments_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/pulls/8/comments","review_comment_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/issues/8/comments","statuses_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/statuses/b423112d0ac1d4d382e23aff9d88f90d18e0821e","head":{"label":"yandex-shri-minsk-2016:creating","ref":"creating","sha":"b423112d0ac1d4d382e23aff9d88f90d18e0821e","user":{"login":"yandex-shri-minsk-2016","id":17139900,"avatar_url":"https://avatars.githubusercontent.com/u/17139900?v=3","gravatar_id":"","url":"https://api.github.com/users/yandex-shri-minsk-2016","html_url":"https://github.com/yandex-shri-minsk-2016","followers_url":"https://api.github.com/users/yandex-shri-minsk-2016/followers","following_url":"https://api.github.com/users/yandex-shri-minsk-2016/following{/other_user}","gists_url":"https://api.github.com/users/yandex-shri-minsk-2016/gists{/gist_id}","starred_url":"https://api.github.com/users/yandex-shri-minsk-2016/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yandex-shri-minsk-2016/subscriptions","organizations_url":"https://api.github.com/users/yandex-shri-minsk-2016/orgs","repos_url":"https://api.github.com/users/yandex-shri-minsk-2016/repos","events_url":"https://api.github.com/users/yandex-shri-minsk-2016/events{/privacy}","received_events_url":"https://api.github.com/users/yandex-shri-minsk-2016/received_events","type":"Organization","site_admin":false},"repo":{"id":55834964,"name":"lenka-dark-side","full_name":"yandex-shri-minsk-2016/lenka-dark-side","owner":{"login":"yandex-shri-minsk-2016","id":17139900,"avatar_url":"https://avatars.githubusercontent.com/u/17139900?v=3","gravatar_id":"","url":"https://api.github.com/users/yandex-shri-minsk-2016","html_url":"https://github.com/yandex-shri-minsk-2016","followers_url":"https://api.github.com/users/yandex-shri-minsk-2016/followers","following_url":"https://api.github.com/users/yandex-shri-minsk-2016/following{/other_user}","gists_url":"https://api.github.com/users/yandex-shri-minsk-2016/gists{/gist_id}","starred_url":"https://api.github.com/users/yandex-shri-minsk-2016/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yandex-shri-minsk-2016/subscriptions","organizations_url":"https://api.github.com/users/yandex-shri-minsk-2016/orgs","repos_url":"https://api.github.com/users/yandex-shri-minsk-2016/repos","events_url":"https://api.github.com/users/yandex-shri-minsk-2016/events{/privacy}","received_events_url":"https://api.github.com/users/yandex-shri-minsk-2016/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yandex-shri-minsk-2016/lenka-dark-side","description":"","fork":false,"url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side","forks_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/forks","keys_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/teams","hooks_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/hooks","issue_events_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/issues/events{/number}","events_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/events","assignees_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/assignees{/user}","branches_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/branches{/branch}","tags_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/tags","blobs_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/git/refs{/sha}","trees_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/statuses/{sha}","languages_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/languages","stargazers_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/stargazers","contributors_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/contributors","subscribers_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/subscribers","subscription_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/subscription","commits_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/commits{/sha}","git_commits_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/git/commits{/sha}","comments_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/comments{/number}","issue_comment_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/issues/comments{/number}","contents_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/contents/{+path}","compare_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/merges","archive_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/downloads","issues_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/issues{/number}","pulls_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/pulls{/number}","milestones_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/milestones{/number}","notifications_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/labels{/name}","releases_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/releases{/id}","deployments_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/deployments","created_at":"2016-04-09T09:00:53Z","updated_at":"2016-04-14T13:08:29Z","pushed_at":"2016-04-17T17:48:00Z","git_url":"git://github.com/yandex-shri-minsk-2016/lenka-dark-side.git","ssh_url":"git@github.com:yandex-shri-minsk-2016/lenka-dark-side.git","clone_url":"https://github.com/yandex-shri-minsk-2016/lenka-dark-side.git","svn_url":"https://github.com/yandex-shri-minsk-2016/lenka-dark-side","homepage":null,"size":205,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":2,"default_branch":"master"}},"base":{"label":"yandex-shri-minsk-2016:master","ref":"master","sha":"944ad752cba24c372175a20f453aa4f0a4b95684","user":{"login":"yandex-shri-minsk-2016","id":17139900,"avatar_url":"https://avatars.githubusercontent.com/u/17139900?v=3","gravatar_id":"","url":"https://api.github.com/users/yandex-shri-minsk-2016","html_url":"https://github.com/yandex-shri-minsk-2016","followers_url":"https://api.github.com/users/yandex-shri-minsk-2016/followers","following_url":"https://api.github.com/users/yandex-shri-minsk-2016/following{/other_user}","gists_url":"https://api.github.com/users/yandex-shri-minsk-2016/gists{/gist_id}","starred_url":"https://api.github.com/users/yandex-shri-minsk-2016/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yandex-shri-minsk-2016/subscriptions","organizations_url":"https://api.github.com/users/yandex-shri-minsk-2016/orgs","repos_url":"https://api.github.com/users/yandex-shri-minsk-2016/repos","events_url":"https://api.github.com/users/yandex-shri-minsk-2016/events{/privacy}","received_events_url":"https://api.github.com/users/yandex-shri-minsk-2016/received_events","type":"Organization","site_admin":false},"repo":{"id":55834964,"name":"lenka-dark-side","full_name":"yandex-shri-minsk-2016/lenka-dark-side","owner":{"login":"yandex-shri-minsk-2016","id":17139900,"avatar_url":"https://avatars.githubusercontent.com/u/17139900?v=3","gravatar_id":"","url":"https://api.github.com/users/yandex-shri-minsk-2016","html_url":"https://github.com/yandex-shri-minsk-2016","followers_url":"https://api.github.com/users/yandex-shri-minsk-2016/followers","following_url":"https://api.github.com/users/yandex-shri-minsk-2016/following{/other_user}","gists_url":"https://api.github.com/users/yandex-shri-minsk-2016/gists{/gist_id}","starred_url":"https://api.github.com/users/yandex-shri-minsk-2016/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yandex-shri-minsk-2016/subscriptions","organizations_url":"https://api.github.com/users/yandex-shri-minsk-2016/orgs","repos_url":"https://api.github.com/users/yandex-shri-minsk-2016/repos","events_url":"https://api.github.com/users/yandex-shri-minsk-2016/events{/privacy}","received_events_url":"https://api.github.com/users/yandex-shri-minsk-2016/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yandex-shri-minsk-2016/lenka-dark-side","description":"","fork":false,"url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side","forks_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/forks","keys_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/teams","hooks_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/hooks","issue_events_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/issues/events{/number}","events_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/events","assignees_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/assignees{/user}","branches_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/branches{/branch}","tags_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/tags","blobs_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/git/refs{/sha}","trees_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/statuses/{sha}","languages_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/languages","stargazers_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/stargazers","contributors_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/contributors","subscribers_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/subscribers","subscription_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/subscription","commits_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/commits{/sha}","git_commits_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/git/commits{/sha}","comments_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/comments{/number}","issue_comment_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/issues/comments{/number}","contents_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/contents/{+path}","compare_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/merges","archive_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/downloads","issues_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/issues{/number}","pulls_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/pulls{/number}","milestones_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/milestones{/number}","notifications_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/labels{/name}","releases_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/releases{/id}","deployments_url":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/deployments","created_at":"2016-04-09T09:00:53Z","updated_at":"2016-04-14T13:08:29Z","pushed_at":"2016-04-17T17:48:00Z","git_url":"git://github.com/yandex-shri-minsk-2016/lenka-dark-side.git","ssh_url":"git@github.com:yandex-shri-minsk-2016/lenka-dark-side.git","clone_url":"https://github.com/yandex-shri-minsk-2016/lenka-dark-side.git","svn_url":"https://github.com/yandex-shri-minsk-2016/lenka-dark-side","homepage":null,"size":205,"stargazers_count":2,"watchers_count":2,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/pulls/8"},"html":{"href":"https://github.com/yandex-shri-minsk-2016/lenka-dark-side/pull/8"},"issue":{"href":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/issues/8"},"comments":{"href":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/issues/8/comments"},"review_comments":{"href":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/pulls/8/comments"},"review_comment":{"href":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/pulls/8/commits"},"statuses":{"href":"https://api.github.com/repos/yandex-shri-minsk-2016/lenka-dark-side/statuses/b423112d0ac1d4d382e23aff9d88f90d18e0821e"}}}}