Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Mathe-Skribbl
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ben Eltschig
Mathe-Skribbl
Commits
b0168754
Commit
b0168754
authored
3 years ago
by
deepdigger
Browse files
Options
Downloads
Patches
Plain Diff
add that Enter Button press on index page does the same as "Host Game"-Button
parent
db369599
Branches
Branches containing commit
1 merge request
!8
Merge Changes into custom-server, mainly paint-functionality
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
client/script.js
+6
-0
6 additions, 0 deletions
client/script.js
with
6 additions
and
0 deletions
client/script.js
+
6
−
0
View file @
b0168754
...
...
@@ -11,6 +11,12 @@ document.addEventListener("DOMContentLoaded",async()=>{
const
gameID
=
document
.
location
.
hash
.
substring
(
1
);
client
=
new
SkribblClient
(
gameID
);
}
else
{
document
.
addEventListener
(
"
keypress
"
,
e
=>
{
if
(
e
.
key
==
"
Enter
"
){
let
clickEvent
=
new
CustomEvent
(
"
click
"
);
button
.
dispatchEvent
(
clickEvent
);
}
})
/** @type {HTMLButtonElement} */
//@ts-ignore
const
button
=
document
.
getElementById
(
"
button
"
);
await
new
Promise
(
resolve
=>
{
button
.
addEventListener
(
"
click
"
,
async
e
=>
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment