mirror of
https://github.com/Findus23/acronomy.git
synced 2024-09-18 14:33:43 +02:00
21 lines
628 B
TypeScript
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()
|
|
}
|