linkpi_firmware_history/rootfs/link/webflex/assets/js/lp.loader.js

11 lines
451 B
JavaScript
Raw Normal View History

2024-02-15 22:07:50 +01:00
import { queryData } from "./lp.utils.js"
Promise.all([queryData("config/lang.json"),queryData("config/theme_standard.json")]).then(config => {
const [ languageConf,themeConf ] = config;
const html = document.querySelector('html');
html.setAttribute('data-bs-language', languageConf.lang);
html.setAttribute('data-bs-theme', themeConf.used);
document.body.style.display = "block";
html.dispatchEvent(new Event("loaded"));
2024-02-15 22:07:52 +01:00
});