{"action":"created","comment":{"url":"https://api.github.com/repos/ReWWeR/jsru-homework/pulls/comments/83476522","pull_request_review_id":4320667,"id":83476522,"diff_hunk":"@@ -1,104 +0,0 @@\n-'use strict';\n-\n-class Calculator {\n-    constructor() {\n-        this.result = 0;\n-        this.operand = '';\n-        this.previousOperand = '';\n-        this.curOperation = '';\n-        this.specialOperations = {\n-            'sqrt': Math.sqrt,\n-            'divideBy': (value) => {\n-                return 1 / value\n-            },\n-            '+/-': (value) => {\n-                return -value\n-            }\n-        };\n-\n-        this.input = document.getElementById('input-field');\n-        this.calculation = document.getElementById('calculation');\n-        let numButtons = document.querySelectorAll('button');\n-\n-        for (let i = 0; i < numButtons.length; i++) {\n-            numButtons[i].addEventListener('click', this.numButtonClick.bind(this));\n-        }\n-    }\n-\n-    numButtonClick(e) {\n-        this.checkValue(e.target.value)\n-    }\n-\n-    checkValue(value) {\n-        if (value === 'C') {\n-            this.result = 0;\n-            this.operand = '';\n-            this.previousOperand = '';\n-            this.curOperation = '';\n-            this.input.value = 0;\n-            this.calculation.innerHTML = '';\n-\n-        } else if (this.result === 0 && value === '0' || this.operand === '0' && value === '0') {","path":"JS-calc/main.js","position":41,"original_position":41,"commit_id":"afcc8aa047b933d18bd5c28f50dea7bae123ab5c","original_commit_id":"afcc8aa047b933d18bd5c28f50dea7bae123ab5c","user":{"login":"mgrinko","id":3237782,"avatar_url":"https://avatars.githubusercontent.com/u/3237782?v=3","gravatar_id":"","url":"https://api.github.com/users/mgrinko","html_url":"https://github.com/mgrinko","followers_url":"https://api.github.com/users/mgrinko/followers","following_url":"https://api.github.com/users/mgrinko/following{/other_user}","gists_url":"https://api.github.com/users/mgrinko/gists{/gist_id}","starred_url":"https://api.github.com/users/mgrinko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgrinko/subscriptions","organizations_url":"https://api.github.com/users/mgrinko/orgs","repos_url":"https://api.github.com/users/mgrinko/repos","events_url":"https://api.github.com/users/mgrinko/events{/privacy}","received_events_url":"https://api.github.com/users/mgrinko/received_events","type":"User","site_admin":false},"body":"слишко много условий для того чтобы охватить их сразу\r\nтут стоило бы упростить вынести логику в метод или методы\r\nкак-то так\r\n```\r\nif (value === '0' && this.resultIsEmpty()) {","created_at":"2016-10-14T18:26:32Z","updated_at":"2016-10-14T18:26:32Z","html_url":"https://github.com/ReWWeR/jsru-homework/pull/2#discussion_r83476522","pull_request_url":"https://api.github.com/repos/ReWWeR/jsru-homework/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/ReWWeR/jsru-homework/pulls/comments/83476522"},"html":{"href":"https://github.com/ReWWeR/jsru-homework/pull/2#discussion_r83476522"},"pull_request":{"href":"https://api.github.com/repos/ReWWeR/jsru-homework/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/ReWWeR/jsru-homework/pulls/2","id":89429649,"html_url":"https://github.com/ReWWeR/jsru-homework/pull/2","diff_url":"https://github.com/ReWWeR/jsru-homework/pull/2.diff","patch_url":"https://github.com/ReWWeR/jsru-homework/pull/2.patch","issue_url":"https://api.github.com/repos/ReWWeR/jsru-homework/issues/2","number":2,"state":"open","locked":false,"title":"for review [DO NOT MERGE]","user":{"login":"mgrinko","id":3237782,"avatar_url":"https://avatars.githubusercontent.com/u/3237782?v=3","gravatar_id":"","url":"https://api.github.com/users/mgrinko","html_url":"https://github.com/mgrinko","followers_url":"https://api.github.com/users/mgrinko/followers","following_url":"https://api.github.com/users/mgrinko/following{/other_user}","gists_url":"https://api.github.com/users/mgrinko/gists{/gist_id}","starred_url":"https://api.github.com/users/mgrinko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgrinko/subscriptions","organizations_url":"https://api.github.com/users/mgrinko/orgs","repos_url":"https://api.github.com/users/mgrinko/repos","events_url":"https://api.github.com/users/mgrinko/events{/privacy}","received_events_url":"https://api.github.com/users/mgrinko/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-14T18:12:48Z","updated_at":"2016-10-14T18:26:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"316ed834ea8a361f27ec9e91ae729245e57a5a4b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ReWWeR/jsru-homework/pulls/2/commits","review_comments_url":"https://api.github.com/repos/ReWWeR/jsru-homework/pulls/2/comments","review_comment_url":"https://api.github.com/repos/ReWWeR/jsru-homework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ReWWeR/jsru-homework/issues/2/comments","statuses_url":"https://api.github.com/repos/ReWWeR/jsru-homework/statuses/afcc8aa047b933d18bd5c28f50dea7bae123ab5c","head":{"label":"mgrinko:gh-pages","ref":"gh-pages","sha":"afcc8aa047b933d18bd5c28f50dea7bae123ab5c","user":{"login":"mgrinko","id":3237782,"avatar_url":"https://avatars.githubusercontent.com/u/3237782?v=3","gravatar_id":"","url":"https://api.github.com/users/mgrinko","html_url":"https://github.com/mgrinko","followers_url":"https://api.github.com/users/mgrinko/followers","following_url":"https://api.github.com/users/mgrinko/following{/other_user}","gists_url":"https://api.github.com/users/mgrinko/gists{/gist_id}","starred_url":"https://api.github.com/users/mgrinko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgrinko/subscriptions","organizations_url":"https://api.github.com/users/mgrinko/orgs","repos_url":"https://api.github.com/users/mgrinko/repos","events_url":"https://api.github.com/users/mgrinko/events{/privacy}","received_events_url":"https://api.github.com/users/mgrinko/received_events","type":"User","site_admin":false},"repo":{"id":70935397,"name":"jsru-homework","full_name":"mgrinko/jsru-homework","owner":{"login":"mgrinko","id":3237782,"avatar_url":"https://avatars.githubusercontent.com/u/3237782?v=3","gravatar_id":"","url":"https://api.github.com/users/mgrinko","html_url":"https://github.com/mgrinko","followers_url":"https://api.github.com/users/mgrinko/followers","following_url":"https://api.github.com/users/mgrinko/following{/other_user}","gists_url":"https://api.github.com/users/mgrinko/gists{/gist_id}","starred_url":"https://api.github.com/users/mgrinko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgrinko/subscriptions","organizations_url":"https://api.github.com/users/mgrinko/orgs","repos_url":"https://api.github.com/users/mgrinko/repos","events_url":"https://api.github.com/users/mgrinko/events{/privacy}","received_events_url":"https://api.github.com/users/mgrinko/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mgrinko/jsru-homework","description":null,"fork":true,"url":"https://api.github.com/repos/mgrinko/jsru-homework","forks_url":"https://api.github.com/repos/mgrinko/jsru-homework/forks","keys_url":"https://api.github.com/repos/mgrinko/jsru-homework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mgrinko/jsru-homework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mgrinko/jsru-homework/teams","hooks_url":"https://api.github.com/repos/mgrinko/jsru-homework/hooks","issue_events_url":"https://api.github.com/repos/mgrinko/jsru-homework/issues/events{/number}","events_url":"https://api.github.com/repos/mgrinko/jsru-homework/events","assignees_url":"https://api.github.com/repos/mgrinko/jsru-homework/assignees{/user}","branches_url":"https://api.github.com/repos/mgrinko/jsru-homework/branches{/branch}","tags_url":"https://api.github.com/repos/mgrinko/jsru-homework/tags","blobs_url":"https://api.github.com/repos/mgrinko/jsru-homework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mgrinko/jsru-homework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mgrinko/jsru-homework/git/refs{/sha}","trees_url":"https://api.github.com/repos/mgrinko/jsru-homework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mgrinko/jsru-homework/statuses/{sha}","languages_url":"https://api.github.com/repos/mgrinko/jsru-homework/languages","stargazers_url":"https://api.github.com/repos/mgrinko/jsru-homework/stargazers","contributors_url":"https://api.github.com/repos/mgrinko/jsru-homework/contributors","subscribers_url":"https://api.github.com/repos/mgrinko/jsru-homework/subscribers","subscription_url":"https://api.github.com/repos/mgrinko/jsru-homework/subscription","commits_url":"https://api.github.com/repos/mgrinko/jsru-homework/commits{/sha}","git_commits_url":"https://api.github.com/repos/mgrinko/jsru-homework/git/commits{/sha}","comments_url":"https://api.github.com/repos/mgrinko/jsru-homework/comments{/number}","issue_comment_url":"https://api.github.com/repos/mgrinko/jsru-homework/issues/comments{/number}","contents_url":"https://api.github.com/repos/mgrinko/jsru-homework/contents/{+path}","compare_url":"https://api.github.com/repos/mgrinko/jsru-homework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mgrinko/jsru-homework/merges","archive_url":"https://api.github.com/repos/mgrinko/jsru-homework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mgrinko/jsru-homework/downloads","issues_url":"https://api.github.com/repos/mgrinko/jsru-homework/issues{/number}","pulls_url":"https://api.github.com/repos/mgrinko/jsru-homework/pulls{/number}","milestones_url":"https://api.github.com/repos/mgrinko/jsru-homework/milestones{/number}","notifications_url":"https://api.github.com/repos/mgrinko/jsru-homework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mgrinko/jsru-homework/labels{/name}","releases_url":"https://api.github.com/repos/mgrinko/jsru-homework/releases{/id}","deployments_url":"https://api.github.com/repos/mgrinko/jsru-homework/deployments","created_at":"2016-10-14T18:08:00Z","updated_at":"2016-10-14T18:08:02Z","pushed_at":"2016-10-14T18:12:11Z","git_url":"git://github.com/mgrinko/jsru-homework.git","ssh_url":"git@github.com:mgrinko/jsru-homework.git","clone_url":"https://github.com/mgrinko/jsru-homework.git","svn_url":"https://github.com/mgrinko/jsru-homework","homepage":null,"size":6,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ReWWeR:gh-pages","ref":"gh-pages","sha":"8bbc0195af1a7f5bd1f235c20268235bcb419473","user":{"login":"ReWWeR","id":4630786,"avatar_url":"https://avatars.githubusercontent.com/u/4630786?v=3","gravatar_id":"","url":"https://api.github.com/users/ReWWeR","html_url":"https://github.com/ReWWeR","followers_url":"https://api.github.com/users/ReWWeR/followers","following_url":"https://api.github.com/users/ReWWeR/following{/other_user}","gists_url":"https://api.github.com/users/ReWWeR/gists{/gist_id}","starred_url":"https://api.github.com/users/ReWWeR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ReWWeR/subscriptions","organizations_url":"https://api.github.com/users/ReWWeR/orgs","repos_url":"https://api.github.com/users/ReWWeR/repos","events_url":"https://api.github.com/users/ReWWeR/events{/privacy}","received_events_url":"https://api.github.com/users/ReWWeR/received_events","type":"User","site_admin":false},"repo":{"id":70912442,"name":"jsru-homework","full_name":"ReWWeR/jsru-homework","owner":{"login":"ReWWeR","id":4630786,"avatar_url":"https://avatars.githubusercontent.com/u/4630786?v=3","gravatar_id":"","url":"https://api.github.com/users/ReWWeR","html_url":"https://github.com/ReWWeR","followers_url":"https://api.github.com/users/ReWWeR/followers","following_url":"https://api.github.com/users/ReWWeR/following{/other_user}","gists_url":"https://api.github.com/users/ReWWeR/gists{/gist_id}","starred_url":"https://api.github.com/users/ReWWeR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ReWWeR/subscriptions","organizations_url":"https://api.github.com/users/ReWWeR/orgs","repos_url":"https://api.github.com/users/ReWWeR/repos","events_url":"https://api.github.com/users/ReWWeR/events{/privacy}","received_events_url":"https://api.github.com/users/ReWWeR/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ReWWeR/jsru-homework","description":null,"fork":false,"url":"https://api.github.com/repos/ReWWeR/jsru-homework","forks_url":"https://api.github.com/repos/ReWWeR/jsru-homework/forks","keys_url":"https://api.github.com/repos/ReWWeR/jsru-homework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ReWWeR/jsru-homework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ReWWeR/jsru-homework/teams","hooks_url":"https://api.github.com/repos/ReWWeR/jsru-homework/hooks","issue_events_url":"https://api.github.com/repos/ReWWeR/jsru-homework/issues/events{/number}","events_url":"https://api.github.com/repos/ReWWeR/jsru-homework/events","assignees_url":"https://api.github.com/repos/ReWWeR/jsru-homework/assignees{/user}","branches_url":"https://api.github.com/repos/ReWWeR/jsru-homework/branches{/branch}","tags_url":"https://api.github.com/repos/ReWWeR/jsru-homework/tags","blobs_url":"https://api.github.com/repos/ReWWeR/jsru-homework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ReWWeR/jsru-homework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ReWWeR/jsru-homework/git/refs{/sha}","trees_url":"https://api.github.com/repos/ReWWeR/jsru-homework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ReWWeR/jsru-homework/statuses/{sha}","languages_url":"https://api.github.com/repos/ReWWeR/jsru-homework/languages","stargazers_url":"https://api.github.com/repos/ReWWeR/jsru-homework/stargazers","contributors_url":"https://api.github.com/repos/ReWWeR/jsru-homework/contributors","subscribers_url":"https://api.github.com/repos/ReWWeR/jsru-homework/subscribers","subscription_url":"https://api.github.com/repos/ReWWeR/jsru-homework/subscription","commits_url":"https://api.github.com/repos/ReWWeR/jsru-homework/commits{/sha}","git_commits_url":"https://api.github.com/repos/ReWWeR/jsru-homework/git/commits{/sha}","comments_url":"https://api.github.com/repos/ReWWeR/jsru-homework/comments{/number}","issue_comment_url":"https://api.github.com/repos/ReWWeR/jsru-homework/issues/comments{/number}","contents_url":"https://api.github.com/repos/ReWWeR/jsru-homework/contents/{+path}","compare_url":"https://api.github.com/repos/ReWWeR/jsru-homework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ReWWeR/jsru-homework/merges","archive_url":"https://api.github.com/repos/ReWWeR/jsru-homework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ReWWeR/jsru-homework/downloads","issues_url":"https://api.github.com/repos/ReWWeR/jsru-homework/issues{/number}","pulls_url":"https://api.github.com/repos/ReWWeR/jsru-homework/pulls{/number}","milestones_url":"https://api.github.com/repos/ReWWeR/jsru-homework/milestones{/number}","notifications_url":"https://api.github.com/repos/ReWWeR/jsru-homework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ReWWeR/jsru-homework/labels{/name}","releases_url":"https://api.github.com/repos/ReWWeR/jsru-homework/releases{/id}","deployments_url":"https://api.github.com/repos/ReWWeR/jsru-homework/deployments","created_at":"2016-10-14T13:25:00Z","updated_at":"2016-10-14T13:29:33Z","pushed_at":"2016-10-14T18:12:48Z","git_url":"git://github.com/ReWWeR/jsru-homework.git","ssh_url":"git@github.com:ReWWeR/jsru-homework.git","clone_url":"https://github.com/ReWWeR/jsru-homework.git","svn_url":"https://github.com/ReWWeR/jsru-homework","homepage":null,"size":6,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":2,"forks":1,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ReWWeR/jsru-homework/pulls/2"},"html":{"href":"https://github.com/ReWWeR/jsru-homework/pull/2"},"issue":{"href":"https://api.github.com/repos/ReWWeR/jsru-homework/issues/2"},"comments":{"href":"https://api.github.com/repos/ReWWeR/jsru-homework/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/ReWWeR/jsru-homework/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/ReWWeR/jsru-homework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ReWWeR/jsru-homework/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/ReWWeR/jsru-homework/statuses/afcc8aa047b933d18bd5c28f50dea7bae123ab5c"}}}}
{"actor":{"display_login":"mgrinko"}}