Commit bf8c99d8 authored by 박민석's avatar 박민석

marked.js offline test

parent 52bc52d3
Pipeline #21843 passed with stages
in 5 minutes and 14 seconds
/* 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'
......
......@@ -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)
})
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment