Remove unnecessary js code
This commit is contained in:
parent
814d2885ed
commit
847d09e734
3 changed files with 3 additions and 8 deletions
|
@ -16,7 +16,6 @@ fun HTML.createGameMasterDocument() {
|
|||
src = "https://unpkg.com/alpinejs@3.x.x/dist/cdn.min.js"
|
||||
defer = true
|
||||
}
|
||||
script { src = "/assets/gameMasterClient.js" }
|
||||
script { src = "/assets/buzzerWebSocket.js" }
|
||||
}
|
||||
body {
|
||||
|
|
|
@ -29,16 +29,16 @@ fun HTML.createPlayerDocument() {
|
|||
}
|
||||
}
|
||||
body {
|
||||
xData("{playerName: \"\", buzzerWebSocket: null}")
|
||||
div(classes = "parent") {
|
||||
xInit(
|
||||
//language=JavaScript
|
||||
"""
|
||||
() => {
|
||||
Alpine.data('buzzerWebSocket', null)
|
||||
startWebSocket('/socket/player')
|
||||
}
|
||||
""".trimIndent()
|
||||
)
|
||||
xData("{playerName: \"\"}")
|
||||
div(classes = "input") {
|
||||
label { +"Player" }
|
||||
div(classes = "bumper") {}
|
||||
|
@ -58,6 +58,7 @@ fun HTML.createPlayerDocument() {
|
|||
xData("{clicked: false}")
|
||||
xOn(
|
||||
"click",
|
||||
//language=JavaScript
|
||||
"""
|
||||
() => {
|
||||
sendUsername(playerName);
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
function appendUsername(username) {
|
||||
$('ol#usernames').append(`<li>${username}</li>`)
|
||||
}
|
Loading…
Reference in a new issue