make page load snappier

This commit is contained in:
Til Schmitter 2026-05-09 01:45:47 +02:00
parent a6d76515cf
commit 40e6f09512
3 changed files with 13 additions and 8 deletions

View file

@ -254,8 +254,8 @@
{%- if lang != "eng" %}
<script src="{{ r }}/.cpr/w/tl/{{ lang }}.js?_={{ ts }}"></script>
{%- endif %}
<script src="{{ r }}/.cpr/w/baguettebox.js?_={{ ts }}"></script>
<script src="{{ r }}/.cpr/w/browser.js?_={{ ts }}"></script>
<script src="{{ r }}/.cpr/w/baguettebox.js?_={{ ts }}"></script>
<script src="{{ r }}/.cpr/w/up2k.js?_={{ ts }}"></script>
{%- if js %}
<script src="{{ js }}_={{ ts }}"></script>

View file

@ -7768,12 +7768,12 @@ var treectl = (function () {
swrite('entreed', 'tree');
get_tree("", get_evpath(), true);
r.show();
r.show(nostore);
clmod(ebi('treeToggleBtn'), 'on', true)
}
r.show = function () {
r.show = function (instant) {
r.hidden = false;
if (!entreed) {
ebi('path').style.display = nonav ? 'none' : 'inline-block';
@ -7786,11 +7786,17 @@ var treectl = (function () {
window.addEventListener('scroll', onscroll);
window.addEventListener('resize', onresize);
// makes animation work by waiting for next frame
setTimeout(function () {
if(!instant){
// makes animation work by waiting for next frame
setTimeout(function () {
onresize();
aligngriditems();
}, 10);
}
else {
onresize();
aligngriditems();
}, 10);
}
};
r.detree = function (e, nw) {

View file

@ -2318,8 +2318,7 @@ var favico = (function () {
scfg_bind(r, 'bg', 'icob', bg, r.upd);
r.upd();
};
r.to = setTimeout(r.init, 100);
r.init();
return r;
})();