Wishlist: clear the info bar when an orb collapses

The synopsis + cast live in the orb's always-present header (.vwsh-xhead), not
inside the collapsing seasons block, so closing an expanded show/channel left
the selected episode/video's synopsis + cast photos lingering until you
re-opened and re-closed. Collapsing an orb now wipes both side columns and drops
any episode selection, so the :empty columns hide cleanly.
This commit is contained in:
BoulderBadgeDad 2026-06-17 08:24:32 -07:00
parent 22adc3bc55
commit 591138a8a1

View file

@ -502,10 +502,24 @@
var orb = e.target.closest('[data-vwsh-orb]');
if (orb) { // show → reveal seasons + lazily load the synopsis/cast info bar
var g = orb.closest('.wl-orb-group');
if (g && g.classList.toggle('expanded')) loadShowInfo(g);
if (!g) return;
// expand → load info bar; collapse → clear it (the synopsis/cast live in
// the always-present header, so they must be wiped or they linger).
if (g.classList.toggle('expanded')) loadShowInfo(g);
else clearInfoBar(g);
}
}
// Empty the info bar + drop any episode selection (so the :empty side columns
// collapse). Used when an orb closes.
function clearInfoBar(group) {
if (!group) return;
var syn = group.querySelector('[data-vwsh-syn]'); if (syn) syn.innerHTML = '';
var cast = group.querySelector('[data-vwsh-cast]'); if (cast) cast.innerHTML = '';
var sel = group.querySelectorAll('.vwsh-epc--sel');
for (var i = 0; i < sel.length; i++) sel[i].classList.remove('vwsh-epc--sel');
}
function wire() {
var tabs = document.querySelectorAll('[data-vwsh-tab]');
for (var i = 0; i < tabs.length; i++) (function (b) {