diff options
Diffstat (limited to 'assets/js/main.js')
| -rw-r--r-- | assets/js/main.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/assets/js/main.js b/assets/js/main.js index 4932e53..3dc536d 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -87,13 +87,17 @@ const getBlog = async (x) => { res('success') }) prism.then(output => { + const script = document.createElement('script') main.body.innerHTML = DOMPurify.sanitize(text, { ADD_TAGS: ["iframe"], ADD_ATTR: ['allow', 'allowfullscreen', 'frameborder', 'scrolling'] }) + script.src = `${window.location.origin}/js/blogitem.js` + document.head.appendChild(script) eventListener() window.scrollTo(0, 0) }) }) } +// Event listeners const eventListener = () => { const menuList = document.getElementById('menu-list') const menuIcon = document.getElementById('menu-icon') |
