function show_patch(patch_id) { const container = document.getElementById('patch-container-' + patch_id); if (container.style.display === 'block') { container.style.display = 'none'; return; } // The patch content is already in a hidden div or we fetch it. // For now, let's assume we have a hidden pre tag. container.style.display = 'block'; }