mirror of
https://github.com/9001/copyparty.git
synced 2026-06-18 20:22:27 -06:00
priorotize bbox image loading when hash is given
This commit is contained in:
parent
6602a88a75
commit
f50c870916
|
|
@ -742,6 +742,8 @@ window.baguetteBox = (function () {
|
|||
}
|
||||
|
||||
function showOverlay(chosenImageIndex) {
|
||||
clmod(ebi('ggrid'), 'waiting', true);
|
||||
|
||||
if (options.noScrollbars) {
|
||||
var a = document.documentElement.style.overflowY,
|
||||
b = document.body.style.overflowY;
|
||||
|
|
@ -765,6 +767,7 @@ window.baguetteBox = (function () {
|
|||
loadImage(currentIndex, function () {
|
||||
preloadNext(currentIndex);
|
||||
preloadPrev(currentIndex);
|
||||
clmod(ebi('ggrid'), 'waiting', false);
|
||||
});
|
||||
|
||||
show_buttons(0);
|
||||
|
|
|
|||
|
|
@ -4132,6 +4132,11 @@ html.e #wrap.thin .ghead {
|
|||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* prevent load of new thumbnails */
|
||||
#ggrid.waiting a:not(.thumbed) img {
|
||||
display: none;
|
||||
}
|
||||
@supports (display: grid) and (gap: 1em) {
|
||||
#ggrid {
|
||||
display: grid;
|
||||
|
|
|
|||
|
|
@ -8762,6 +8762,10 @@ var treectl = (function () {
|
|||
vbar.onresize();
|
||||
showfile.addlinks();
|
||||
drag.initfiles();
|
||||
|
||||
var media = scan_hash(location.hash);
|
||||
if(media && media[0] == 'g')
|
||||
clmod(ebi('ggrid'), 'waiting', true);
|
||||
setTimeout(eval_hash, 1);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue