priorotize bbox image loading when hash is given

This commit is contained in:
Til Schmitter 2026-05-25 00:46:27 +02:00
parent 6602a88a75
commit f50c870916
3 changed files with 12 additions and 0 deletions

View file

@ -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);

View file

@ -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;

View file

@ -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);
};