diff options
| author | Mhykol <mchaeldonald62@pm.me> | 2024-05-27 09:14:33 -0400 |
|---|---|---|
| committer | Mhykol <mchaeldonald62@pm.me> | 2024-05-27 09:14:33 -0400 |
| commit | 45f3395cd525c8ce7ce33de4fe555180058ac532 (patch) | |
| tree | fa3dee0574cd9535dfe01cb7701be04671de4c43 /assets/js | |
| parent | 29c3b61a511b96360b897ed7bda5a095aabc474f (diff) | |
Added slideshow for blog
Diffstat (limited to 'assets/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') |
