{"action":"created","comment":{"url":"https://api.github.com/repos/vvscode/js--touchsoft/pulls/comments/194330424","pull_request_review_id":127479164,"id":194330424,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NDMzMDQyNA==","diff_hunk":"@@ -0,0 +1,423 @@\n+window.TsChat = function MegaSuperUsefulChat(userConfig) {\n+  var generateUUID = function generateUUID0() {\n+    return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,\n+        function replacement0(c) {\n+          var r = Math.random() * 16 | 0; // eslint-disable-line no-bitwise\n+          var v = c === 'x' ? r : (r & 0x3 | 0x8); // eslint-disable-line no-bitwise\n+          return v.toString(16);\n+        }).toUpperCase();\n+  };\n+  var config = {\n+    title: \"Default Chat title\",\n+    botName: \"Agent\",\n+    chatUrl: \"url\",\n+    cssClass: \"YourCustomCss\",\n+    position: \"right\",\n+    allowMinimize: false,\n+    allowDrag: false,\n+    showDateTime: false,\n+    requireName: false,\n+    userName: \"Harry\",\n+    nameVerified: false,\n+    requestsType: \"fetch\",\n+    databaseURL: \"https://superchat-firebase.firebaseio.com\",\n+    uuid: localStorage.getItem('client-uuid') || generateUUID(),\n+    maximized: localStorage.getItem('maximized') || '0',\n+    chat: \"not rendered yet\",\n+    msgsCount: 0,\n+    transcriptArray : null\n+  };\n+  var dbEndpoints = {\n+    userSettings: \"settings\",\n+    userMessages: \"messages\"\n+  };\n+  var isUser = function isUser0(record) {\n+    return record.src === 'u';\n+  };\n+  var Record = function Record(date, src, msg) {\n+    this.date = date;\n+    this.src = src;\n+    this.msg = msg;\n+  };\n+  var UserSettings = function UserSettings(uuid, maximized, name, msgsCount) {\n+    this.uuid = uuid;\n+    this.maximized = maximized;\n+    this.name = name;\n+    this.msgsCount = msgsCount;\n+  };\n+\n+  function saveObjectToRemoteDatabase(endpoint, obj) {\n+    fetch(config.databaseURL + '/' + endpoint + '/' + config.uuid  + '.json',\n+        {\n+          method: 'PUT',\n+          body: JSON.stringify(obj),\n+          headers: {\n+            Accept: 'application/json',\n+            'Content-Type': 'application/json'\n+          }\n+        })\n+    .then(function response0(response) {\n+      return response.json();\n+    })\n+    .then(console.log); // eslint-disable-line no-console\n+  }\n+\n+  function readObjectFromRemoteDatabase(endpoint, callback) {\n+    fetch(config.databaseURL + '/' + endpoint + '/' + config.uuid  + '.json',","path":"task-02/denism02/chat02all.js","position":66,"original_position":66,"commit_id":"74afe1a9443a963cec51056ed87c6068e7fdec36","original_commit_id":"74afe1a9443a963cec51056ed87c6068e7fdec36","user":{"login":"vvscode","id":6904368,"node_id":"MDQ6VXNlcjY5MDQzNjg=","avatar_url":"https://avatars1.githubusercontent.com/u/6904368?v=4","gravatar_id":"","url":"https://api.github.com/users/vvscode","html_url":"https://github.com/vvscode","followers_url":"https://api.github.com/users/vvscode/followers","following_url":"https://api.github.com/users/vvscode/following{/other_user}","gists_url":"https://api.github.com/users/vvscode/gists{/gist_id}","starred_url":"https://api.github.com/users/vvscode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vvscode/subscriptions","organizations_url":"https://api.github.com/users/vvscode/orgs","repos_url":"https://api.github.com/users/vvscode/repos","events_url":"https://api.github.com/users/vvscode/events{/privacy}","received_events_url":"https://api.github.com/users/vvscode/received_events","type":"User","site_admin":false},"body":"а для XMLHttpRequest  такую функциональность реализовать в виде функции не хочется?","created_at":"2018-06-11T08:46:30Z","updated_at":"2018-06-11T08:46:30Z","html_url":"https://github.com/vvscode/js--touchsoft/pull/5#discussion_r194330424","pull_request_url":"https://api.github.com/repos/vvscode/js--touchsoft/pulls/5","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/vvscode/js--touchsoft/pulls/comments/194330424"},"html":{"href":"https://github.com/vvscode/js--touchsoft/pull/5#discussion_r194330424"},"pull_request":{"href":"https://api.github.com/repos/vvscode/js--touchsoft/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/vvscode/js--touchsoft/pulls/5","id":190781234,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkwNzgxMjM0","html_url":"https://github.com/vvscode/js--touchsoft/pull/5","diff_url":"https://github.com/vvscode/js--touchsoft/pull/5.diff","patch_url":"https://github.com/vvscode/js--touchsoft/pull/5.patch","issue_url":"https://api.github.com/repos/vvscode/js--touchsoft/issues/5","number":5,"state":"open","locked":false,"title":"solution 1,2 denism (updated)","user":{"login":"wonakak","id":16936936,"node_id":"MDQ6VXNlcjE2OTM2OTM2","avatar_url":"https://avatars1.githubusercontent.com/u/16936936?v=4","gravatar_id":"","url":"https://api.github.com/users/wonakak","html_url":"https://github.com/wonakak","followers_url":"https://api.github.com/users/wonakak/followers","following_url":"https://api.github.com/users/wonakak/following{/other_user}","gists_url":"https://api.github.com/users/wonakak/gists{/gist_id}","starred_url":"https://api.github.com/users/wonakak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wonakak/subscriptions","organizations_url":"https://api.github.com/users/wonakak/orgs","repos_url":"https://api.github.com/users/wonakak/repos","events_url":"https://api.github.com/users/wonakak/events{/privacy}","received_events_url":"https://api.github.com/users/wonakak/received_events","type":"User","site_admin":false},"body":"**TASK 02** on HTMLPREVIEW. JS sources is here \"**task-02/denism02/chat02all.js**\" & \"**task-02/denism02/myform.js**\"\r\n**Tests for task-01 ready but have wrong paths, Tests for task-02 is skipped for a while.**\r\n\r\n**CHAT htmlpreview**: http://htmlpreview.github.io/?https://github.com/wonakak/js--touchsoft/blob/master/task-02/denism02/site02.html\r\n\r\n**FORM htmlpreview**: http://htmlpreview.github.io/?https://github.com/wonakak/js--touchsoft/blob/master/task-02/denism02/myform.html","created_at":"2018-05-27T10:46:51Z","updated_at":"2018-06-11T08:46:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"adf64201519bffa2b16f6a2bf112cdafbc4ef6a2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/vvscode/js--touchsoft/pulls/5/commits","review_comments_url":"https://api.github.com/repos/vvscode/js--touchsoft/pulls/5/comments","review_comment_url":"https://api.github.com/repos/vvscode/js--touchsoft/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vvscode/js--touchsoft/issues/5/comments","statuses_url":"https://api.github.com/repos/vvscode/js--touchsoft/statuses/74afe1a9443a963cec51056ed87c6068e7fdec36","head":{"label":"wonakak:master","ref":"master","sha":"74afe1a9443a963cec51056ed87c6068e7fdec36","user":{"login":"wonakak","id":16936936,"node_id":"MDQ6VXNlcjE2OTM2OTM2","avatar_url":"https://avatars1.githubusercontent.com/u/16936936?v=4","gravatar_id":"","url":"https://api.github.com/users/wonakak","html_url":"https://github.com/wonakak","followers_url":"https://api.github.com/users/wonakak/followers","following_url":"https://api.github.com/users/wonakak/following{/other_user}","gists_url":"https://api.github.com/users/wonakak/gists{/gist_id}","starred_url":"https://api.github.com/users/wonakak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wonakak/subscriptions","organizations_url":"https://api.github.com/users/wonakak/orgs","repos_url":"https://api.github.com/users/wonakak/repos","events_url":"https://api.github.com/users/wonakak/events{/privacy}","received_events_url":"https://api.github.com/users/wonakak/received_events","type":"User","site_admin":false},"repo":{"id":134386339,"node_id":"MDEwOlJlcG9zaXRvcnkxMzQzODYzMzk=","name":"js--touchsoft","full_name":"wonakak/js--touchsoft","owner":{"login":"wonakak","id":16936936,"node_id":"MDQ6VXNlcjE2OTM2OTM2","avatar_url":"https://avatars1.githubusercontent.com/u/16936936?v=4","gravatar_id":"","url":"https://api.github.com/users/wonakak","html_url":"https://github.com/wonakak","followers_url":"https://api.github.com/users/wonakak/followers","following_url":"https://api.github.com/users/wonakak/following{/other_user}","gists_url":"https://api.github.com/users/wonakak/gists{/gist_id}","starred_url":"https://api.github.com/users/wonakak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wonakak/subscriptions","organizations_url":"https://api.github.com/users/wonakak/orgs","repos_url":"https://api.github.com/users/wonakak/repos","events_url":"https://api.github.com/users/wonakak/events{/privacy}","received_events_url":"https://api.github.com/users/wonakak/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wonakak/js--touchsoft","description":"TouchSoft Js Course","fork":true,"url":"https://api.github.com/repos/wonakak/js--touchsoft","forks_url":"https://api.github.com/repos/wonakak/js--touchsoft/forks","keys_url":"https://api.github.com/repos/wonakak/js--touchsoft/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wonakak/js--touchsoft/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wonakak/js--touchsoft/teams","hooks_url":"https://api.github.com/repos/wonakak/js--touchsoft/hooks","issue_events_url":"https://api.github.com/repos/wonakak/js--touchsoft/issues/events{/number}","events_url":"https://api.github.com/repos/wonakak/js--touchsoft/events","assignees_url":"https://api.github.com/repos/wonakak/js--touchsoft/assignees{/user}","branches_url":"https://api.github.com/repos/wonakak/js--touchsoft/branches{/branch}","tags_url":"https://api.github.com/repos/wonakak/js--touchsoft/tags","blobs_url":"https://api.github.com/repos/wonakak/js--touchsoft/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wonakak/js--touchsoft/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wonakak/js--touchsoft/git/refs{/sha}","trees_url":"https://api.github.com/repos/wonakak/js--touchsoft/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wonakak/js--touchsoft/statuses/{sha}","languages_url":"https://api.github.com/repos/wonakak/js--touchsoft/languages","stargazers_url":"https://api.github.com/repos/wonakak/js--touchsoft/stargazers","contributors_url":"https://api.github.com/repos/wonakak/js--touchsoft/contributors","subscribers_url":"https://api.github.com/repos/wonakak/js--touchsoft/subscribers","subscription_url":"https://api.github.com/repos/wonakak/js--touchsoft/subscription","commits_url":"https://api.github.com/repos/wonakak/js--touchsoft/commits{/sha}","git_commits_url":"https://api.github.com/repos/wonakak/js--touchsoft/git/commits{/sha}","comments_url":"https://api.github.com/repos/wonakak/js--touchsoft/comments{/number}","issue_comment_url":"https://api.github.com/repos/wonakak/js--touchsoft/issues/comments{/number}","contents_url":"https://api.github.com/repos/wonakak/js--touchsoft/contents/{+path}","compare_url":"https://api.github.com/repos/wonakak/js--touchsoft/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wonakak/js--touchsoft/merges","archive_url":"https://api.github.com/repos/wonakak/js--touchsoft/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wonakak/js--touchsoft/downloads","issues_url":"https://api.github.com/repos/wonakak/js--touchsoft/issues{/number}","pulls_url":"https://api.github.com/repos/wonakak/js--touchsoft/pulls{/number}","milestones_url":"https://api.github.com/repos/wonakak/js--touchsoft/milestones{/number}","notifications_url":"https://api.github.com/repos/wonakak/js--touchsoft/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wonakak/js--touchsoft/labels{/name}","releases_url":"https://api.github.com/repos/wonakak/js--touchsoft/releases{/id}","deployments_url":"https://api.github.com/repos/wonakak/js--touchsoft/deployments","created_at":"2018-05-22T08:43:30Z","updated_at":"2018-06-10T11:08:36Z","pushed_at":"2018-06-10T16:32:28Z","git_url":"git://github.com/wonakak/js--touchsoft.git","ssh_url":"git@github.com:wonakak/js--touchsoft.git","clone_url":"https://github.com/wonakak/js--touchsoft.git","svn_url":"https://github.com/wonakak/js--touchsoft","homepage":null,"size":1121,"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":"vvscode:master","ref":"master","sha":"240ff7f6a6c9bb3836664366dde721b4d658a231","user":{"login":"vvscode","id":6904368,"node_id":"MDQ6VXNlcjY5MDQzNjg=","avatar_url":"https://avatars1.githubusercontent.com/u/6904368?v=4","gravatar_id":"","url":"https://api.github.com/users/vvscode","html_url":"https://github.com/vvscode","followers_url":"https://api.github.com/users/vvscode/followers","following_url":"https://api.github.com/users/vvscode/following{/other_user}","gists_url":"https://api.github.com/users/vvscode/gists{/gist_id}","starred_url":"https://api.github.com/users/vvscode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vvscode/subscriptions","organizations_url":"https://api.github.com/users/vvscode/orgs","repos_url":"https://api.github.com/users/vvscode/repos","events_url":"https://api.github.com/users/vvscode/events{/privacy}","received_events_url":"https://api.github.com/users/vvscode/received_events","type":"User","site_admin":false},"repo":{"id":134176658,"node_id":"MDEwOlJlcG9zaXRvcnkxMzQxNzY2NTg=","name":"js--touchsoft","full_name":"vvscode/js--touchsoft","owner":{"login":"vvscode","id":6904368,"node_id":"MDQ6VXNlcjY5MDQzNjg=","avatar_url":"https://avatars1.githubusercontent.com/u/6904368?v=4","gravatar_id":"","url":"https://api.github.com/users/vvscode","html_url":"https://github.com/vvscode","followers_url":"https://api.github.com/users/vvscode/followers","following_url":"https://api.github.com/users/vvscode/following{/other_user}","gists_url":"https://api.github.com/users/vvscode/gists{/gist_id}","starred_url":"https://api.github.com/users/vvscode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vvscode/subscriptions","organizations_url":"https://api.github.com/users/vvscode/orgs","repos_url":"https://api.github.com/users/vvscode/repos","events_url":"https://api.github.com/users/vvscode/events{/privacy}","received_events_url":"https://api.github.com/users/vvscode/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vvscode/js--touchsoft","description":"TouchSoft Js Course","fork":false,"url":"https://api.github.com/repos/vvscode/js--touchsoft","forks_url":"https://api.github.com/repos/vvscode/js--touchsoft/forks","keys_url":"https://api.github.com/repos/vvscode/js--touchsoft/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vvscode/js--touchsoft/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vvscode/js--touchsoft/teams","hooks_url":"https://api.github.com/repos/vvscode/js--touchsoft/hooks","issue_events_url":"https://api.github.com/repos/vvscode/js--touchsoft/issues/events{/number}","events_url":"https://api.github.com/repos/vvscode/js--touchsoft/events","assignees_url":"https://api.github.com/repos/vvscode/js--touchsoft/assignees{/user}","branches_url":"https://api.github.com/repos/vvscode/js--touchsoft/branches{/branch}","tags_url":"https://api.github.com/repos/vvscode/js--touchsoft/tags","blobs_url":"https://api.github.com/repos/vvscode/js--touchsoft/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vvscode/js--touchsoft/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vvscode/js--touchsoft/git/refs{/sha}","trees_url":"https://api.github.com/repos/vvscode/js--touchsoft/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vvscode/js--touchsoft/statuses/{sha}","languages_url":"https://api.github.com/repos/vvscode/js--touchsoft/languages","stargazers_url":"https://api.github.com/repos/vvscode/js--touchsoft/stargazers","contributors_url":"https://api.github.com/repos/vvscode/js--touchsoft/contributors","subscribers_url":"https://api.github.com/repos/vvscode/js--touchsoft/subscribers","subscription_url":"https://api.github.com/repos/vvscode/js--touchsoft/subscription","commits_url":"https://api.github.com/repos/vvscode/js--touchsoft/commits{/sha}","git_commits_url":"https://api.github.com/repos/vvscode/js--touchsoft/git/commits{/sha}","comments_url":"https://api.github.com/repos/vvscode/js--touchsoft/comments{/number}","issue_comment_url":"https://api.github.com/repos/vvscode/js--touchsoft/issues/comments{/number}","contents_url":"https://api.github.com/repos/vvscode/js--touchsoft/contents/{+path}","compare_url":"https://api.github.com/repos/vvscode/js--touchsoft/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vvscode/js--touchsoft/merges","archive_url":"https://api.github.com/repos/vvscode/js--touchsoft/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vvscode/js--touchsoft/downloads","issues_url":"https://api.github.com/repos/vvscode/js--touchsoft/issues{/number}","pulls_url":"https://api.github.com/repos/vvscode/js--touchsoft/pulls{/number}","milestones_url":"https://api.github.com/repos/vvscode/js--touchsoft/milestones{/number}","notifications_url":"https://api.github.com/repos/vvscode/js--touchsoft/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vvscode/js--touchsoft/labels{/name}","releases_url":"https://api.github.com/repos/vvscode/js--touchsoft/releases{/id}","deployments_url":"https://api.github.com/repos/vvscode/js--touchsoft/deployments","created_at":"2018-05-20T18:38:17Z","updated_at":"2018-06-11T08:40:13Z","pushed_at":"2018-06-11T08:40:08Z","git_url":"git://github.com/vvscode/js--touchsoft.git","ssh_url":"git@github.com:vvscode/js--touchsoft.git","clone_url":"https://github.com/vvscode/js--touchsoft.git","svn_url":"https://github.com/vvscode/js--touchsoft","homepage":null,"size":1092,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"archived":false,"open_issues_count":16,"license":null,"forks":19,"open_issues":16,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vvscode/js--touchsoft/pulls/5"},"html":{"href":"https://github.com/vvscode/js--touchsoft/pull/5"},"issue":{"href":"https://api.github.com/repos/vvscode/js--touchsoft/issues/5"},"comments":{"href":"https://api.github.com/repos/vvscode/js--touchsoft/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/vvscode/js--touchsoft/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/vvscode/js--touchsoft/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vvscode/js--touchsoft/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/vvscode/js--touchsoft/statuses/74afe1a9443a963cec51056ed87c6068e7fdec36"}},"author_association":"NONE"}}
{"actor":{"display_login":"vvscode"}}