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
512b675b
Commit
512b675b
authored
Nov 11, 2024
by
박민석
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
marked.js test
parent
7a02a858
Pipeline
#21871
passed with stages
in 4 minutes and 21 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
11 deletions
+15
-11
10-check-offline.js
src/js/10-check-offline.js
+14
-10
footer-scripts.hbs
src/partials/footer-scripts.hbs
+1
-1
No files found.
src/js/10-check-offline.js
View file @
512b675b
/* eslint-disable no-undef */
const
chatButton
=
document
.
querySelector
(
'.sidebar .chat-btn'
)
const
menu
=
document
.
querySelector
(
'.navbar-menu'
)
;(
function
()
{
'use strict'
// 네트워크 상태 확인 및 버튼 제어
function
checkIfLocalFile
()
{
if
(
window
.
location
.
protocol
===
'file:'
)
{
chatButton
.
style
.
display
=
'none'
// 오프라인 상태면 chatButton 숨김
menu
.
style
.
display
=
'none'
const
chatButton
=
document
.
querySelector
(
'.sidebar .chat-btn'
)
const
menu
=
document
.
querySelector
(
'.navbar-menu'
)
// 네트워크 상태 확인 및 버튼 제어
function
checkIfLocalFile
()
{
if
(
window
.
location
.
protocol
===
'file:'
)
{
chatButton
.
style
.
display
=
'none'
// 오프라인 상태면 chatButton 숨김
menu
.
style
.
display
=
'none'
}
}
}
// 초기 상태 설정
checkIfLocalFile
()
// 초기 상태 설정
checkIfLocalFile
()
})()
src/partials/footer-scripts.hbs
View file @
512b675b
<script
id=
"site-script"
src=
"
{{{
uiRootPath
}}}
/js/site.js"
data-ui-root-path=
"
{{{
uiRootPath
}}}
"
type=
"module"
></script>
<script
async
src=
"
{{{
uiRootPath
}}}
/js/vendor/marked.js"
></script>
{{!-- <script async src="{{{uiRootPath}}}/js/vendor/marked.js"></script> --}}
<script
async
src=
"
{{{
uiRootPath
}}}
/js/vendor/highlight.js"
></script>
{{#if
env
.
SITE_SEARCH_PROVIDER
}}
{{>
search-scripts
}}
...
...
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