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
bf8c99d8
Commit
bf8c99d8
authored
Nov 11, 2024
by
박민석
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
marked.js offline test
parent
52bc52d3
Pipeline
#21843
passed with stages
in 5 minutes and 14 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
08-chat.js
src/js/08-chat.js
+1
-1
10-check-offline.js
src/js/10-check-offline.js
+8
-0
No files found.
src/js/08-chat.js
View file @
bf8c99d8
/* eslint-disable no-undef */
import
{
marked
}
from
'https://cdn.jsdelivr.net/npm/marked/lib/marked.esm.js'
//
import { marked } from 'https://cdn.jsdelivr.net/npm/marked/lib/marked.esm.js'
;(
function
()
{
'use strict'
...
...
src/js/10-check-offline.js
View file @
bf8c99d8
...
...
@@ -10,6 +10,14 @@
if
(
window
.
location
.
protocol
===
'file:'
)
{
chatButton
.
style
.
display
=
'none'
// 오프라인 상태면 chatButton 숨김
menu
.
style
.
display
=
'none'
}
else
{
import
(
'https://cdn.jsdelivr.net/npm/marked/lib/marked.esm.js'
)
.
then
((
module
)
=>
{
window
.
marked
=
module
.
marked
})
.
catch
((
error
)
=>
{
console
.
error
(
'Failed to load Marked.js:'
,
error
)
})
}
}
...
...
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