Drew Dixon | For the Times-Union { // query dom only after user click if (!vdContainer) { vdContainer = document.getElementById(‘videoDetailsContainer’); vdShow = document.getElementById(‘vdt_show’), vdHide = document.getElementById(‘vdt_hide’); } vdContainer.hidden = !(vdContainer.hidden); // show/hide elements if (vdContainer.hidden) { vdShow.hidden = false; vdHide.hidden = true; } else { if (!flagCaption) { flagCaption = true; fireCaptionAnalytics() } vdShow.hidden = true; vdHide.hidden = false; } }); function fireCaptionAnalytics () { let analytics = document.getElementById(“pageAnalytics”); try { if (analytics) { analytics.fireEvent(`${ga_data.route.basePageType}|${section}|${subsection}|streamline|expandCaption`); } else { if (window.newrelic) window.newrelic.noticeError(‘page analytics tag not found’); } } catch (e) { if (window.newrelic) window.newrelic.noticeError(e); }…