{ // 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; […]