Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SWLab UI
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
SWD
SWLab UI
Commits
7a02a858
Commit
7a02a858
authored
3 months ago
by
박민석
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test offline ui
parent
0c8ecb5c
Pipeline
#21864
passed with stages
in 4 minutes and 22 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
14 deletions
+10
-14
10-check-offline.js
src/js/10-check-offline.js
+10
-14
No files found.
src/js/10-check-offline.js
View file @
7a02a858
/* eslint-disable no-undef */
/* eslint-disable no-undef */
;(
function
()
{
const
chatButton
=
document
.
querySelector
(
'.sidebar .chat-btn'
)
'use strict'
const
menu
=
document
.
querySelector
(
'.navbar-menu'
)
const
chatButton
=
document
.
querySelector
(
'.sidebar .chat-btn'
)
// 네트워크 상태 확인 및 버튼 제어
const
menu
=
document
.
querySelector
(
'.navbar-menu'
)
function
checkIfLocalFile
()
{
// 네트워크 상태 확인 및 버튼 제어
function
checkIfLocalFile
()
{
if
(
window
.
location
.
protocol
===
'file:'
)
{
if
(
window
.
location
.
protocol
===
'file:'
)
{
chatButton
.
style
.
display
=
'none'
// 오프라인 상태면 chatButton 숨김
chatButton
.
style
.
display
=
'none'
// 오프라인 상태면 chatButton 숨김
menu
.
style
.
display
=
'none'
menu
.
style
.
display
=
'none'
}
}
}
}
// 초기 상태 설정
// 초기 상태 설정
checkIfLocalFile
()
checkIfLocalFile
()
})()
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment