1
0
Fork 0
mirror of https://github.com/Findus23/RPGnotes.git synced 2024-09-19 15:43:45 +02:00
RPGnotes/static/main.ts

30 lines
738 B
TypeScript

import 'vite/modulepreload-polyfill'
// import "./scss/main.scss"
import "./js/sentry"
// @ts-ignore
import Dropdown from 'bootstrap/js/src/dropdown'
// @ts-ignore
import Collapse from 'bootstrap/js/src/collapse'
import "./js/autocomplete"
import "./js/popover"
import "./js/gallery"
const bootstrapModules = [Collapse, Dropdown]
function init(): void {
if (document.getElementById("id_description_md")) {
import ("./js/codemirror").then(value => console.log("loaded"))
}
if (document.getElementById("graph")) {
import ("./js/graph").then(value => console.log("graph loaded"))
}
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', init)
} else {
init()
}