feat: portfolio/about listings start locked on their first file
same end state as clicking the first row by hand — hovering other rows no longer steals the preview until you actually click one. clicking a different row still jumps straight to it and relocks there; clicking the locked row again releases it back to hover-browsing. games are excluded (nothing to browse), matched via the game-embed class rather than page context so it stays correct no matter which page a game was launched from.
This commit is contained in:
@@ -85,6 +85,9 @@
|
||||
|
||||
var start = rows.findIndex(function (a) { return a.classList.contains("is-selected"); });
|
||||
select(start < 0 ? 0 : start, true); // initial selection: don't echo into the shell yet
|
||||
// portfolio/about listings start pre-locked on their first file, same as a
|
||||
// manual click — games stay hover-driven, there's nothing else to browse there
|
||||
if (container && !container.classList.contains("game-embed")) setFrozen(true);
|
||||
|
||||
// warm the cache so switching between gallery images is instant
|
||||
var srcs = rows.map(function (a) { return a.getAttribute("data-img"); }).filter(Boolean);
|
||||
|
||||
Reference in New Issue
Block a user