Toggle navigation
Toggle navigation
This project
Loading...
Sign in
최시원
/
Singer-Composer
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
devsho
2021-11-25 21:07:26 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
94b7c8bc7cb31f79c2f4892f4266fbf2ebb59933
94b7c8bc
1 parent
9d86ecd4
chat visual update
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 additions
and
5 deletions
app.js
js/chat.js
app.js
View file @
94b7c8b
...
...
@@ -98,7 +98,7 @@ io.sockets.on('connection', function(socket) {
console
.
log
(
logString
+
socket
.
name
+
' 님이 접속하였습니다.('
+
ip
+
')'
)
/* 모든 소켓에게 전송 */
io
.
sockets
.
emit
(
'update'
,
{
type
:
'connect'
,
message
:
socket
.
name
+
'님이 접속하였습니다.'
})
io
.
sockets
.
emit
(
'update'
,
{
type
:
'connect'
,
name
:
'SEVER'
,
message
:
socket
.
name
+
'님이 접속하였습니다.'
})
}
})
...
...
js/chat.js
View file @
94b7c8b
...
...
@@ -13,16 +13,12 @@ socket.on('update', function(data) {
var
chat
=
document
.
getElementById
(
'chat'
)
var
message
=
document
.
createElement
(
'div'
)
<<<<<<<
HEAD
var
node
;
if
(
data
.
name
!=
"SERVER"
){
node
=
document
.
createTextNode
(
`
${
data
.
name
}
:
${
data
.
message
}
`
)
}
else
{
node
=
document
.
createTextNode
(
`
${
data
.
message
}
`
)
}
=======
var
node
=
document
.
createTextNode
(
`
${
data
.
message
}
`
)
>>>>>>>
1
f86430deee4a2d7a6b101a712358a5552e443ee
var
className
=
''
// 타입에 따라 적용할 클래스를 다르게 지정
...
...
Please
register
or
login
to post a comment