{"action":"created","comment":{"url":"https://api.github.com/repos/blstream/jess/pulls/comments/55532525","id":55532525,"diff_hunk":"@@ -1,24 +1,88 @@\n package com.blstream.jess\n \n-import scala.scalajs.js\n import org.scalajs.dom\n-import dom.document\n-import js.annotation.JSExport\n-import js.Dynamic.global\n+import org.scalajs.dom.raw._\n+\n+import scalajs.js.JSApp\n+import scalajs.js.annotation.JSExport\n+import scalatags.JsDom.all._\n+import scalatags.JsDom.{styles => css}\n+\n+\n+case class Score(player: String, points: Int)\n+case class GameEvent(event: String)\n \n @JSExport\n-object GameBoard extends js.JSApp {\n+object GameBoard extends JSApp {\n+\n+  val joinButton = dom.document.getElementById(\"ws-join\").asInstanceOf[HTMLButtonElement]\n+  val wsAddressInput = dom.document.getElementById(\"ws-address\").asInstanceOf[HTMLInputElement]\n+  val rnd = util.Random\n+  val ev = scala.collection.mutable.ArrayBuffer.empty[GameEvent]\n \n   @JSExport\n   def main(): Unit = {\n-    appendPar(document.body, \"Jess Game Board\")\n+\n+    wsAddressInput.placeholder = \"127.0.0.1:8090/stream\"\n+    wsAddressInput.defaultValue = \"127.0.0.1:8090/stream\"\n+\n+    joinButton.onclick = { (event: MouseEvent) =>\n+      consoleLog(wsAddressInput.value)\n+      joinChat(wsAddressInput.value)\n+      event.preventDefault()\n+    }\n+\n   }\n \n-  def appendPar(targetNode: dom.Node, text: String): Unit = {\n-    val parNode = document.createElement(\"p\")\n-    val textNode = document.createTextNode(text)\n-    parNode.appendChild(textNode)\n-    targetNode.appendChild(parNode)\n+  private def joinChat(ws: String): Unit = {","path":"frontend/src/main/scala/jess/GameBoardApp.scala","position":48,"original_position":48,"commit_id":"b511bc18c0923838eb55d55e5b9702a847483ed3","original_commit_id":"b511bc18c0923838eb55d55e5b9702a847483ed3","user":{"login":"mrcmatuszak","id":799033,"avatar_url":"https://avatars.githubusercontent.com/u/799033?v=3","gravatar_id":"","url":"https://api.github.com/users/mrcmatuszak","html_url":"https://github.com/mrcmatuszak","followers_url":"https://api.github.com/users/mrcmatuszak/followers","following_url":"https://api.github.com/users/mrcmatuszak/following{/other_user}","gists_url":"https://api.github.com/users/mrcmatuszak/gists{/gist_id}","starred_url":"https://api.github.com/users/mrcmatuszak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrcmatuszak/subscriptions","organizations_url":"https://api.github.com/users/mrcmatuszak/orgs","repos_url":"https://api.github.com/users/mrcmatuszak/repos","events_url":"https://api.github.com/users/mrcmatuszak/events{/privacy}","received_events_url":"https://api.github.com/users/mrcmatuszak/received_events","type":"User","site_admin":false},"body":":D renamed","created_at":"2016-03-09T15:14:50Z","updated_at":"2016-03-09T15:14:50Z","html_url":"https://github.com/blstream/jess/pull/19#discussion_r55532525","pull_request_url":"https://api.github.com/repos/blstream/jess/pulls/19","_links":{"self":{"href":"https://api.github.com/repos/blstream/jess/pulls/comments/55532525"},"html":{"href":"https://github.com/blstream/jess/pull/19#discussion_r55532525"},"pull_request":{"href":"https://api.github.com/repos/blstream/jess/pulls/19"}}},"pull_request":{"url":"https://api.github.com/repos/blstream/jess/pulls/19","id":62225786,"html_url":"https://github.com/blstream/jess/pull/19","diff_url":"https://github.com/blstream/jess/pull/19.diff","patch_url":"https://github.com/blstream/jess/pull/19.patch","issue_url":"https://api.github.com/repos/blstream/jess/issues/19","number":19,"state":"open","locked":false,"title":"Update page layout","user":{"login":"mrcmatuszak","id":799033,"avatar_url":"https://avatars.githubusercontent.com/u/799033?v=3","gravatar_id":"","url":"https://api.github.com/users/mrcmatuszak","html_url":"https://github.com/mrcmatuszak","followers_url":"https://api.github.com/users/mrcmatuszak/followers","following_url":"https://api.github.com/users/mrcmatuszak/following{/other_user}","gists_url":"https://api.github.com/users/mrcmatuszak/gists{/gist_id}","starred_url":"https://api.github.com/users/mrcmatuszak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mrcmatuszak/subscriptions","organizations_url":"https://api.github.com/users/mrcmatuszak/orgs","repos_url":"https://api.github.com/users/mrcmatuszak/repos","events_url":"https://api.github.com/users/mrcmatuszak/events{/privacy}","received_events_url":"https://api.github.com/users/mrcmatuszak/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-03-09T13:09:31Z","updated_at":"2016-03-09T15:14:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b2539889fd69c80880434a92b90b13e91e353118","assignee":{"login":"lukeindykiewicz","id":3164986,"avatar_url":"https://avatars.githubusercontent.com/u/3164986?v=3","gravatar_id":"","url":"https://api.github.com/users/lukeindykiewicz","html_url":"https://github.com/lukeindykiewicz","followers_url":"https://api.github.com/users/lukeindykiewicz/followers","following_url":"https://api.github.com/users/lukeindykiewicz/following{/other_user}","gists_url":"https://api.github.com/users/lukeindykiewicz/gists{/gist_id}","starred_url":"https://api.github.com/users/lukeindykiewicz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukeindykiewicz/subscriptions","organizations_url":"https://api.github.com/users/lukeindykiewicz/orgs","repos_url":"https://api.github.com/users/lukeindykiewicz/repos","events_url":"https://api.github.com/users/lukeindykiewicz/events{/privacy}","received_events_url":"https://api.github.com/users/lukeindykiewicz/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/blstream/jess/pulls/19/commits","review_comments_url":"https://api.github.com/repos/blstream/jess/pulls/19/comments","review_comment_url":"https://api.github.com/repos/blstream/jess/pulls/comments{/number}","comments_url":"https://api.github.com/repos/blstream/jess/issues/19/comments","statuses_url":"https://api.github.com/repos/blstream/jess/statuses/b511bc18c0923838eb55d55e5b9702a847483ed3","head":{"label":"blstream:fe-websocket","ref":"fe-websocket","sha":"b511bc18c0923838eb55d55e5b9702a847483ed3","user":{"login":"blstream","id":316451,"avatar_url":"https://avatars.githubusercontent.com/u/316451?v=3","gravatar_id":"","url":"https://api.github.com/users/blstream","html_url":"https://github.com/blstream","followers_url":"https://api.github.com/users/blstream/followers","following_url":"https://api.github.com/users/blstream/following{/other_user}","gists_url":"https://api.github.com/users/blstream/gists{/gist_id}","starred_url":"https://api.github.com/users/blstream/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blstream/subscriptions","organizations_url":"https://api.github.com/users/blstream/orgs","repos_url":"https://api.github.com/users/blstream/repos","events_url":"https://api.github.com/users/blstream/events{/privacy}","received_events_url":"https://api.github.com/users/blstream/received_events","type":"Organization","site_admin":false},"repo":{"id":50988906,"name":"jess","full_name":"blstream/jess","owner":{"login":"blstream","id":316451,"avatar_url":"https://avatars.githubusercontent.com/u/316451?v=3","gravatar_id":"","url":"https://api.github.com/users/blstream","html_url":"https://github.com/blstream","followers_url":"https://api.github.com/users/blstream/followers","following_url":"https://api.github.com/users/blstream/following{/other_user}","gists_url":"https://api.github.com/users/blstream/gists{/gist_id}","starred_url":"https://api.github.com/users/blstream/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blstream/subscriptions","organizations_url":"https://api.github.com/users/blstream/orgs","repos_url":"https://api.github.com/users/blstream/repos","events_url":"https://api.github.com/users/blstream/events{/privacy}","received_events_url":"https://api.github.com/users/blstream/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/blstream/jess","description":"","fork":false,"url":"https://api.github.com/repos/blstream/jess","forks_url":"https://api.github.com/repos/blstream/jess/forks","keys_url":"https://api.github.com/repos/blstream/jess/keys{/key_id}","collaborators_url":"https://api.github.com/repos/blstream/jess/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/blstream/jess/teams","hooks_url":"https://api.github.com/repos/blstream/jess/hooks","issue_events_url":"https://api.github.com/repos/blstream/jess/issues/events{/number}","events_url":"https://api.github.com/repos/blstream/jess/events","assignees_url":"https://api.github.com/repos/blstream/jess/assignees{/user}","branches_url":"https://api.github.com/repos/blstream/jess/branches{/branch}","tags_url":"https://api.github.com/repos/blstream/jess/tags","blobs_url":"https://api.github.com/repos/blstream/jess/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/blstream/jess/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/blstream/jess/git/refs{/sha}","trees_url":"https://api.github.com/repos/blstream/jess/git/trees{/sha}","statuses_url":"https://api.github.com/repos/blstream/jess/statuses/{sha}","languages_url":"https://api.github.com/repos/blstream/jess/languages","stargazers_url":"https://api.github.com/repos/blstream/jess/stargazers","contributors_url":"https://api.github.com/repos/blstream/jess/contributors","subscribers_url":"https://api.github.com/repos/blstream/jess/subscribers","subscription_url":"https://api.github.com/repos/blstream/jess/subscription","commits_url":"https://api.github.com/repos/blstream/jess/commits{/sha}","git_commits_url":"https://api.github.com/repos/blstream/jess/git/commits{/sha}","comments_url":"https://api.github.com/repos/blstream/jess/comments{/number}","issue_comment_url":"https://api.github.com/repos/blstream/jess/issues/comments{/number}","contents_url":"https://api.github.com/repos/blstream/jess/contents/{+path}","compare_url":"https://api.github.com/repos/blstream/jess/compare/{base}...{head}","merges_url":"https://api.github.com/repos/blstream/jess/merges","archive_url":"https://api.github.com/repos/blstream/jess/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/blstream/jess/downloads","issues_url":"https://api.github.com/repos/blstream/jess/issues{/number}","pulls_url":"https://api.github.com/repos/blstream/jess/pulls{/number}","milestones_url":"https://api.github.com/repos/blstream/jess/milestones{/number}","notifications_url":"https://api.github.com/repos/blstream/jess/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/blstream/jess/labels{/name}","releases_url":"https://api.github.com/repos/blstream/jess/releases{/id}","deployments_url":"https://api.github.com/repos/blstream/jess/deployments","created_at":"2016-02-03T09:28:15Z","updated_at":"2016-02-03T10:16:52Z","pushed_at":"2016-03-09T13:41:51Z","git_url":"git://github.com/blstream/jess.git","ssh_url":"git@github.com:blstream/jess.git","clone_url":"https://github.com/blstream/jess.git","svn_url":"https://github.com/blstream/jess","homepage":null,"size":378,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"blstream:master","ref":"master","sha":"c84776b1ddcb2d2c0d7a7ea458222fb0dcc2ebd0","user":{"login":"blstream","id":316451,"avatar_url":"https://avatars.githubusercontent.com/u/316451?v=3","gravatar_id":"","url":"https://api.github.com/users/blstream","html_url":"https://github.com/blstream","followers_url":"https://api.github.com/users/blstream/followers","following_url":"https://api.github.com/users/blstream/following{/other_user}","gists_url":"https://api.github.com/users/blstream/gists{/gist_id}","starred_url":"https://api.github.com/users/blstream/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blstream/subscriptions","organizations_url":"https://api.github.com/users/blstream/orgs","repos_url":"https://api.github.com/users/blstream/repos","events_url":"https://api.github.com/users/blstream/events{/privacy}","received_events_url":"https://api.github.com/users/blstream/received_events","type":"Organization","site_admin":false},"repo":{"id":50988906,"name":"jess","full_name":"blstream/jess","owner":{"login":"blstream","id":316451,"avatar_url":"https://avatars.githubusercontent.com/u/316451?v=3","gravatar_id":"","url":"https://api.github.com/users/blstream","html_url":"https://github.com/blstream","followers_url":"https://api.github.com/users/blstream/followers","following_url":"https://api.github.com/users/blstream/following{/other_user}","gists_url":"https://api.github.com/users/blstream/gists{/gist_id}","starred_url":"https://api.github.com/users/blstream/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blstream/subscriptions","organizations_url":"https://api.github.com/users/blstream/orgs","repos_url":"https://api.github.com/users/blstream/repos","events_url":"https://api.github.com/users/blstream/events{/privacy}","received_events_url":"https://api.github.com/users/blstream/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/blstream/jess","description":"","fork":false,"url":"https://api.github.com/repos/blstream/jess","forks_url":"https://api.github.com/repos/blstream/jess/forks","keys_url":"https://api.github.com/repos/blstream/jess/keys{/key_id}","collaborators_url":"https://api.github.com/repos/blstream/jess/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/blstream/jess/teams","hooks_url":"https://api.github.com/repos/blstream/jess/hooks","issue_events_url":"https://api.github.com/repos/blstream/jess/issues/events{/number}","events_url":"https://api.github.com/repos/blstream/jess/events","assignees_url":"https://api.github.com/repos/blstream/jess/assignees{/user}","branches_url":"https://api.github.com/repos/blstream/jess/branches{/branch}","tags_url":"https://api.github.com/repos/blstream/jess/tags","blobs_url":"https://api.github.com/repos/blstream/jess/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/blstream/jess/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/blstream/jess/git/refs{/sha}","trees_url":"https://api.github.com/repos/blstream/jess/git/trees{/sha}","statuses_url":"https://api.github.com/repos/blstream/jess/statuses/{sha}","languages_url":"https://api.github.com/repos/blstream/jess/languages","stargazers_url":"https://api.github.com/repos/blstream/jess/stargazers","contributors_url":"https://api.github.com/repos/blstream/jess/contributors","subscribers_url":"https://api.github.com/repos/blstream/jess/subscribers","subscription_url":"https://api.github.com/repos/blstream/jess/subscription","commits_url":"https://api.github.com/repos/blstream/jess/commits{/sha}","git_commits_url":"https://api.github.com/repos/blstream/jess/git/commits{/sha}","comments_url":"https://api.github.com/repos/blstream/jess/comments{/number}","issue_comment_url":"https://api.github.com/repos/blstream/jess/issues/comments{/number}","contents_url":"https://api.github.com/repos/blstream/jess/contents/{+path}","compare_url":"https://api.github.com/repos/blstream/jess/compare/{base}...{head}","merges_url":"https://api.github.com/repos/blstream/jess/merges","archive_url":"https://api.github.com/repos/blstream/jess/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/blstream/jess/downloads","issues_url":"https://api.github.com/repos/blstream/jess/issues{/number}","pulls_url":"https://api.github.com/repos/blstream/jess/pulls{/number}","milestones_url":"https://api.github.com/repos/blstream/jess/milestones{/number}","notifications_url":"https://api.github.com/repos/blstream/jess/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/blstream/jess/labels{/name}","releases_url":"https://api.github.com/repos/blstream/jess/releases{/id}","deployments_url":"https://api.github.com/repos/blstream/jess/deployments","created_at":"2016-02-03T09:28:15Z","updated_at":"2016-02-03T10:16:52Z","pushed_at":"2016-03-09T13:41:51Z","git_url":"git://github.com/blstream/jess.git","ssh_url":"git@github.com:blstream/jess.git","clone_url":"https://github.com/blstream/jess.git","svn_url":"https://github.com/blstream/jess","homepage":null,"size":378,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/blstream/jess/pulls/19"},"html":{"href":"https://github.com/blstream/jess/pull/19"},"issue":{"href":"https://api.github.com/repos/blstream/jess/issues/19"},"comments":{"href":"https://api.github.com/repos/blstream/jess/issues/19/comments"},"review_comments":{"href":"https://api.github.com/repos/blstream/jess/pulls/19/comments"},"review_comment":{"href":"https://api.github.com/repos/blstream/jess/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/blstream/jess/pulls/19/commits"},"statuses":{"href":"https://api.github.com/repos/blstream/jess/statuses/b511bc18c0923838eb55d55e5b9702a847483ed3"}}}}