1
0
Fork 0
mirror of https://github.com/Findus23/acronomy.git synced 2024-09-18 14:33:43 +02:00
acronomy/static/main.ts
2024-07-02 22:37:09 +02:00

21 lines
628 B
TypeScript

import 'vite/modulepreload-polyfill'
import "./js/autocomplete"
import "./js/bootstrap"
function init_edit(){
if (document.querySelector('input[name="tags"]')) {
import ("./js/tags").then(value => console.log("loaded"))
}
if (document.getElementById("id_description_md")) {
import ("./js/codemirror").then(value => console.log("loaded"))
}
if (document.getElementById("letterform")) {
import ("./js/letter").then(value => console.log("loaded"))
}
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', init_edit)
} else {
init_edit()
}