mirror of
https://github.com/9001/copyparty.git
synced 2026-06-18 20:22:27 -06:00
make page load snappier
This commit is contained in:
parent
a6d76515cf
commit
40e6f09512
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
})();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue