
_default_js_pageloader.begin = () => {
    let loadbar = document.getElementById("loadbar");
    loadbar.classList = "loading";
    loadbar.style.width = "5%";
}

_default_js_pageloader.progress = (url, current, total) => {
    let loadbar = document.getElementById("loadbar");
    let percent = (current / total) * 100;
    loadbar.style.width = percent + "%";
}

_default_js_pageloader.loaded = (url, after_load) => {
    let loadbar = document.getElementById("loadbar");
    loadbar.style.width = "100%";
    loadbar.classList = "";
    setTimeout(after_load, 100);
}