{"action":"created","comment":{"url":"https://api.github.com/repos/novnc/noVNC/pulls/comments/168786507","pull_request_review_id":97214214,"id":168786507,"diff_hunk":"@@ -13,33 +13,30 @@ export default {\n \n     encode: function (data) {\n         \"use strict\";\n-        var result = '';\n-        var toBase64Table = this.toBase64Table;\n-        var length = data.length;\n-        var lengthpad = (length % 3);\n+        let result = '';\n+        const length = data.length;\n+        const lengthpad = (length % 3);\n         // Convert every three bytes to 4 ascii characters.\n \n-        for (var i = 0; i < (length - 2); i += 3) {\n-            result += toBase64Table[data[i] >> 2];\n-            result += toBase64Table[((data[i] & 0x03) << 4) + (data[i + 1] >> 4)];\n-            result += toBase64Table[((data[i + 1] & 0x0f) << 2) + (data[i + 2] >> 6)];\n-            result += toBase64Table[data[i + 2] & 0x3f];\n+        for (let i = 0; i < (length - 2); i += 3) {\n+            result += this.toBase64Table[data[i] >> 2];\n+            result += this.toBase64Table[((data[i] & 0x03) << 4) + (data[i + 1] >> 4)];\n+            result += this.toBase64Table[((data[i + 1] & 0x0f) << 2) + (data[i + 2] >> 6)];\n+            result += this.toBase64Table[data[i + 2] & 0x3f];","path":"core/base64.js","position":25,"original_position":22,"commit_id":"2fc64c7d252ee047a848d27fe697fc1562617a45","original_commit_id":"4fa8f40a0b454e7195da01f4b597772804abb5da","user":{"login":"juanjoDiaz","id":3322485,"avatar_url":"https://avatars0.githubusercontent.com/u/3322485?v=4","gravatar_id":"","url":"https://api.github.com/users/juanjoDiaz","html_url":"https://github.com/juanjoDiaz","followers_url":"https://api.github.com/users/juanjoDiaz/followers","following_url":"https://api.github.com/users/juanjoDiaz/following{/other_user}","gists_url":"https://api.github.com/users/juanjoDiaz/gists{/gist_id}","starred_url":"https://api.github.com/users/juanjoDiaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juanjoDiaz/subscriptions","organizations_url":"https://api.github.com/users/juanjoDiaz/orgs","repos_url":"https://api.github.com/users/juanjoDiaz/repos","events_url":"https://api.github.com/users/juanjoDiaz/events{/privacy}","received_events_url":"https://api.github.com/users/juanjoDiaz/received_events","type":"User","site_admin":false},"body":"Before we did on top: `var toBase64Table = this.toBase64Table;`\r\n\r\nWhich is unnecessary. You can just call from this.","created_at":"2018-02-16T15:26:38Z","updated_at":"2018-02-16T15:26:38Z","html_url":"https://github.com/novnc/noVNC/pull/1013#discussion_r168786507","pull_request_url":"https://api.github.com/repos/novnc/noVNC/pulls/1013","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/novnc/noVNC/pulls/comments/168786507"},"html":{"href":"https://github.com/novnc/noVNC/pull/1013#discussion_r168786507"},"pull_request":{"href":"https://api.github.com/repos/novnc/noVNC/pulls/1013"}},"in_reply_to_id":168113634},"pull_request":{"url":"https://api.github.com/repos/novnc/noVNC/pulls/1013","id":166578106,"html_url":"https://github.com/novnc/noVNC/pull/1013","diff_url":"https://github.com/novnc/noVNC/pull/1013.diff","patch_url":"https://github.com/novnc/noVNC/pull/1013.patch","issue_url":"https://api.github.com/repos/novnc/noVNC/issues/1013","number":1013,"state":"open","locked":false,"title":"Add eslint and update noVNC to ES6","user":{"login":"juanjoDiaz","id":3322485,"avatar_url":"https://avatars0.githubusercontent.com/u/3322485?v=4","gravatar_id":"","url":"https://api.github.com/users/juanjoDiaz","html_url":"https://github.com/juanjoDiaz","followers_url":"https://api.github.com/users/juanjoDiaz/followers","following_url":"https://api.github.com/users/juanjoDiaz/following{/other_user}","gists_url":"https://api.github.com/users/juanjoDiaz/gists{/gist_id}","starred_url":"https://api.github.com/users/juanjoDiaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juanjoDiaz/subscriptions","organizations_url":"https://api.github.com/users/juanjoDiaz/orgs","repos_url":"https://api.github.com/users/juanjoDiaz/repos","events_url":"https://api.github.com/users/juanjoDiaz/events{/privacy}","received_events_url":"https://api.github.com/users/juanjoDiaz/received_events","type":"User","site_admin":false},"body":"New attempt to move the library to ES6.\r\n\r\nI'd start pushing more simple commits so it's simple to review.","created_at":"2018-02-01T16:00:55Z","updated_at":"2018-02-16T15:26:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0fca173a26a9df5755dca7cf80771a03d64fefa5","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/novnc/noVNC/pulls/1013/commits","review_comments_url":"https://api.github.com/repos/novnc/noVNC/pulls/1013/comments","review_comment_url":"https://api.github.com/repos/novnc/noVNC/pulls/comments{/number}","comments_url":"https://api.github.com/repos/novnc/noVNC/issues/1013/comments","statuses_url":"https://api.github.com/repos/novnc/noVNC/statuses/2fc64c7d252ee047a848d27fe697fc1562617a45","head":{"label":"juanjoDiaz:es6_refactor_2","ref":"es6_refactor_2","sha":"2fc64c7d252ee047a848d27fe697fc1562617a45","user":{"login":"juanjoDiaz","id":3322485,"avatar_url":"https://avatars0.githubusercontent.com/u/3322485?v=4","gravatar_id":"","url":"https://api.github.com/users/juanjoDiaz","html_url":"https://github.com/juanjoDiaz","followers_url":"https://api.github.com/users/juanjoDiaz/followers","following_url":"https://api.github.com/users/juanjoDiaz/following{/other_user}","gists_url":"https://api.github.com/users/juanjoDiaz/gists{/gist_id}","starred_url":"https://api.github.com/users/juanjoDiaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juanjoDiaz/subscriptions","organizations_url":"https://api.github.com/users/juanjoDiaz/orgs","repos_url":"https://api.github.com/users/juanjoDiaz/repos","events_url":"https://api.github.com/users/juanjoDiaz/events{/privacy}","received_events_url":"https://api.github.com/users/juanjoDiaz/received_events","type":"User","site_admin":false},"repo":{"id":117651466,"name":"noVNC","full_name":"juanjoDiaz/noVNC","owner":{"login":"juanjoDiaz","id":3322485,"avatar_url":"https://avatars0.githubusercontent.com/u/3322485?v=4","gravatar_id":"","url":"https://api.github.com/users/juanjoDiaz","html_url":"https://github.com/juanjoDiaz","followers_url":"https://api.github.com/users/juanjoDiaz/followers","following_url":"https://api.github.com/users/juanjoDiaz/following{/other_user}","gists_url":"https://api.github.com/users/juanjoDiaz/gists{/gist_id}","starred_url":"https://api.github.com/users/juanjoDiaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juanjoDiaz/subscriptions","organizations_url":"https://api.github.com/users/juanjoDiaz/orgs","repos_url":"https://api.github.com/users/juanjoDiaz/repos","events_url":"https://api.github.com/users/juanjoDiaz/events{/privacy}","received_events_url":"https://api.github.com/users/juanjoDiaz/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/juanjoDiaz/noVNC","description":"VNC client using HTML5 (Web Sockets, Canvas) with encryption (wss://) support.","fork":true,"url":"https://api.github.com/repos/juanjoDiaz/noVNC","forks_url":"https://api.github.com/repos/juanjoDiaz/noVNC/forks","keys_url":"https://api.github.com/repos/juanjoDiaz/noVNC/keys{/key_id}","collaborators_url":"https://api.github.com/repos/juanjoDiaz/noVNC/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/juanjoDiaz/noVNC/teams","hooks_url":"https://api.github.com/repos/juanjoDiaz/noVNC/hooks","issue_events_url":"https://api.github.com/repos/juanjoDiaz/noVNC/issues/events{/number}","events_url":"https://api.github.com/repos/juanjoDiaz/noVNC/events","assignees_url":"https://api.github.com/repos/juanjoDiaz/noVNC/assignees{/user}","branches_url":"https://api.github.com/repos/juanjoDiaz/noVNC/branches{/branch}","tags_url":"https://api.github.com/repos/juanjoDiaz/noVNC/tags","blobs_url":"https://api.github.com/repos/juanjoDiaz/noVNC/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/juanjoDiaz/noVNC/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/juanjoDiaz/noVNC/git/refs{/sha}","trees_url":"https://api.github.com/repos/juanjoDiaz/noVNC/git/trees{/sha}","statuses_url":"https://api.github.com/repos/juanjoDiaz/noVNC/statuses/{sha}","languages_url":"https://api.github.com/repos/juanjoDiaz/noVNC/languages","stargazers_url":"https://api.github.com/repos/juanjoDiaz/noVNC/stargazers","contributors_url":"https://api.github.com/repos/juanjoDiaz/noVNC/contributors","subscribers_url":"https://api.github.com/repos/juanjoDiaz/noVNC/subscribers","subscription_url":"https://api.github.com/repos/juanjoDiaz/noVNC/subscription","commits_url":"https://api.github.com/repos/juanjoDiaz/noVNC/commits{/sha}","git_commits_url":"https://api.github.com/repos/juanjoDiaz/noVNC/git/commits{/sha}","comments_url":"https://api.github.com/repos/juanjoDiaz/noVNC/comments{/number}","issue_comment_url":"https://api.github.com/repos/juanjoDiaz/noVNC/issues/comments{/number}","contents_url":"https://api.github.com/repos/juanjoDiaz/noVNC/contents/{+path}","compare_url":"https://api.github.com/repos/juanjoDiaz/noVNC/compare/{base}...{head}","merges_url":"https://api.github.com/repos/juanjoDiaz/noVNC/merges","archive_url":"https://api.github.com/repos/juanjoDiaz/noVNC/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/juanjoDiaz/noVNC/downloads","issues_url":"https://api.github.com/repos/juanjoDiaz/noVNC/issues{/number}","pulls_url":"https://api.github.com/repos/juanjoDiaz/noVNC/pulls{/number}","milestones_url":"https://api.github.com/repos/juanjoDiaz/noVNC/milestones{/number}","notifications_url":"https://api.github.com/repos/juanjoDiaz/noVNC/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/juanjoDiaz/noVNC/labels{/name}","releases_url":"https://api.github.com/repos/juanjoDiaz/noVNC/releases{/id}","deployments_url":"https://api.github.com/repos/juanjoDiaz/noVNC/deployments","created_at":"2018-01-16T07:50:15Z","updated_at":"2018-01-16T07:50:17Z","pushed_at":"2018-02-10T21:21:39Z","git_url":"git://github.com/juanjoDiaz/noVNC.git","ssh_url":"git@github.com:juanjoDiaz/noVNC.git","clone_url":"https://github.com/juanjoDiaz/noVNC.git","svn_url":"https://github.com/juanjoDiaz/noVNC","homepage":"novnc.com","size":9337,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"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":"novnc:master","ref":"master","sha":"37b4d13db81e0e80e117c07b86ff98714c7b6b1a","user":{"login":"novnc","id":24572588,"avatar_url":"https://avatars2.githubusercontent.com/u/24572588?v=4","gravatar_id":"","url":"https://api.github.com/users/novnc","html_url":"https://github.com/novnc","followers_url":"https://api.github.com/users/novnc/followers","following_url":"https://api.github.com/users/novnc/following{/other_user}","gists_url":"https://api.github.com/users/novnc/gists{/gist_id}","starred_url":"https://api.github.com/users/novnc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/novnc/subscriptions","organizations_url":"https://api.github.com/users/novnc/orgs","repos_url":"https://api.github.com/users/novnc/repos","events_url":"https://api.github.com/users/novnc/events{/privacy}","received_events_url":"https://api.github.com/users/novnc/received_events","type":"Organization","site_admin":false},"repo":{"id":598164,"name":"noVNC","full_name":"novnc/noVNC","owner":{"login":"novnc","id":24572588,"avatar_url":"https://avatars2.githubusercontent.com/u/24572588?v=4","gravatar_id":"","url":"https://api.github.com/users/novnc","html_url":"https://github.com/novnc","followers_url":"https://api.github.com/users/novnc/followers","following_url":"https://api.github.com/users/novnc/following{/other_user}","gists_url":"https://api.github.com/users/novnc/gists{/gist_id}","starred_url":"https://api.github.com/users/novnc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/novnc/subscriptions","organizations_url":"https://api.github.com/users/novnc/orgs","repos_url":"https://api.github.com/users/novnc/repos","events_url":"https://api.github.com/users/novnc/events{/privacy}","received_events_url":"https://api.github.com/users/novnc/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/novnc/noVNC","description":"VNC client using HTML5 (Web Sockets, Canvas) with encryption (wss://) support.","fork":false,"url":"https://api.github.com/repos/novnc/noVNC","forks_url":"https://api.github.com/repos/novnc/noVNC/forks","keys_url":"https://api.github.com/repos/novnc/noVNC/keys{/key_id}","collaborators_url":"https://api.github.com/repos/novnc/noVNC/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/novnc/noVNC/teams","hooks_url":"https://api.github.com/repos/novnc/noVNC/hooks","issue_events_url":"https://api.github.com/repos/novnc/noVNC/issues/events{/number}","events_url":"https://api.github.com/repos/novnc/noVNC/events","assignees_url":"https://api.github.com/repos/novnc/noVNC/assignees{/user}","branches_url":"https://api.github.com/repos/novnc/noVNC/branches{/branch}","tags_url":"https://api.github.com/repos/novnc/noVNC/tags","blobs_url":"https://api.github.com/repos/novnc/noVNC/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/novnc/noVNC/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/novnc/noVNC/git/refs{/sha}","trees_url":"https://api.github.com/repos/novnc/noVNC/git/trees{/sha}","statuses_url":"https://api.github.com/repos/novnc/noVNC/statuses/{sha}","languages_url":"https://api.github.com/repos/novnc/noVNC/languages","stargazers_url":"https://api.github.com/repos/novnc/noVNC/stargazers","contributors_url":"https://api.github.com/repos/novnc/noVNC/contributors","subscribers_url":"https://api.github.com/repos/novnc/noVNC/subscribers","subscription_url":"https://api.github.com/repos/novnc/noVNC/subscription","commits_url":"https://api.github.com/repos/novnc/noVNC/commits{/sha}","git_commits_url":"https://api.github.com/repos/novnc/noVNC/git/commits{/sha}","comments_url":"https://api.github.com/repos/novnc/noVNC/comments{/number}","issue_comment_url":"https://api.github.com/repos/novnc/noVNC/issues/comments{/number}","contents_url":"https://api.github.com/repos/novnc/noVNC/contents/{+path}","compare_url":"https://api.github.com/repos/novnc/noVNC/compare/{base}...{head}","merges_url":"https://api.github.com/repos/novnc/noVNC/merges","archive_url":"https://api.github.com/repos/novnc/noVNC/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/novnc/noVNC/downloads","issues_url":"https://api.github.com/repos/novnc/noVNC/issues{/number}","pulls_url":"https://api.github.com/repos/novnc/noVNC/pulls{/number}","milestones_url":"https://api.github.com/repos/novnc/noVNC/milestones{/number}","notifications_url":"https://api.github.com/repos/novnc/noVNC/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/novnc/noVNC/labels{/name}","releases_url":"https://api.github.com/repos/novnc/noVNC/releases{/id}","deployments_url":"https://api.github.com/repos/novnc/noVNC/deployments","created_at":"2010-04-07T01:55:44Z","updated_at":"2018-02-15T20:38:00Z","pushed_at":"2018-02-13T15:30:33Z","git_url":"git://github.com/novnc/noVNC.git","ssh_url":"git@github.com:novnc/noVNC.git","clone_url":"https://github.com/novnc/noVNC.git","svn_url":"https://github.com/novnc/noVNC","homepage":"novnc.com","size":8948,"stargazers_count":4027,"watchers_count":4027,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":881,"mirror_url":null,"archived":false,"open_issues_count":39,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":881,"open_issues":39,"watchers":4027,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/novnc/noVNC/pulls/1013"},"html":{"href":"https://github.com/novnc/noVNC/pull/1013"},"issue":{"href":"https://api.github.com/repos/novnc/noVNC/issues/1013"},"comments":{"href":"https://api.github.com/repos/novnc/noVNC/issues/1013/comments"},"review_comments":{"href":"https://api.github.com/repos/novnc/noVNC/pulls/1013/comments"},"review_comment":{"href":"https://api.github.com/repos/novnc/noVNC/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/novnc/noVNC/pulls/1013/commits"},"statuses":{"href":"https://api.github.com/repos/novnc/noVNC/statuses/2fc64c7d252ee047a848d27fe697fc1562617a45"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"juanjoDiaz"}}