<div id="tcr-snippet-box" style="border:1px solid #ddd; border-radius:6px; padding:12px; background:#333333; position:relative;">
  <button id="tcr-copy-btn" style="position:absolute; top:8px; right:8px; padding:4px 10px; border:1px solid #ccc; background:#666666; cursor:pointer; border-radius:4px;">
    Copy
  </button>
  <pre style="margin:0; white-space:pre-wrap; color:#e46b0c;"><code>&lt;a href="https://thecoderebel.com" target="_blank" rel="noopener noreferrer"&gt;
  &lt;img src="https://thecoderebel.com/wp-content/uploads/2025/09/TCRWebLogo.webp" 
       alt="The Code Rebel" style="max-height:100px; vertical-align:middle;" /&gt;
&lt;/a&gt;</code></pre>
</div>

<script>
document.addEventListener("DOMContentLoaded", function() {
  const btn = document.getElementById("tcr-copy-btn");
  const code = document.querySelector("#tcr-snippet-box code").innerText;
  btn.addEventListener("click", function() {
    navigator.clipboard.writeText(code).then(() => {
      btn.innerText = "Copied!";
      setTimeout(() => btn.innerText = "Copy", 2000);
    });
  });
});
</script>