odeBlock.parentNode);

    const button = document.createElement('button');
    button.className = 'copy-btn';
    button.textContent = 'Copy';

    button.addEventListener('click', () => {
      const code = codeBlock.innerText;
      navigator.clipboard.writeText(code).then(() => {
        button.textContent = 'Copied!';
        setTimeout(() => (button.textContent = 'Copy'), 1500);
      });
    });

    wrapper.appendChild(button);
  });
});
</script>
{% endblock javascripts %}
