diff --git a/public/app.js b/public/app.js index 886d72f..4040a43 100644 --- a/public/app.js +++ b/public/app.js @@ -66,8 +66,8 @@ async function submitSignup() { function copyKey() { var key = document.getElementById('apiKeyDisplay').textContent; navigator.clipboard.writeText(key).then(function() { - document.querySelector('.copy-hint').textContent = '✓ Copied!'; - setTimeout(function() { document.querySelector('.copy-hint').textContent = 'Click to copy'; }, 2000); + var btn = document.getElementById('apiKeyDisplay'); var origText = btn.textContent; btn.textContent = 'Copied!'; document.querySelector('.copy-hint').textContent = '✓ Copied!'; + setTimeout(function() { btn.textContent = origText; document.querySelector('.copy-hint').textContent = 'Click to copy'; }); } @@ -81,3 +81,13 @@ async function checkout() { alert('Something went wrong. Please try again.'); } } + +// BUG-005 fix: attach all click handlers via JS instead of inline onclick +document.addEventListener('DOMContentLoaded', function() { + document.getElementById('btn-signup').addEventListener('click', openSignup); + document.getElementById('btn-signup-2').addEventListener('click', openSignup); + document.getElementById('btn-checkout').addEventListener('click', checkout); + document.getElementById('btn-close-signup').addEventListener('click', closeSignup); + document.getElementById('signupBtn').addEventListener('click', submitSignup); + document.getElementById('apiKeyDisplay').addEventListener('click', copyKey); +}); diff --git a/public/index.html b/public/index.html index 8dbfadc..b93fb9a 100644 --- a/public/index.html +++ b/public/index.html @@ -91,7 +91,7 @@ footer { padding: 40px 0; text-align: center; color: var(--muted); font-size: 0.

HTML & Markdown to PDF

One API call. Beautiful PDFs. Built-in invoice templates. No headless browser setup, no dependencies, no hassle.

- + View Docs
@@ -193,7 +193,7 @@ footer { padding: 40px 0; text-align: center; color: var(--muted); font-size: 0.
  • All templates
  • Community support
  • - +
    @@ -220,18 +220,18 @@ footer { padding: 40px 0; text-align: center; color: var(--muted); font-size: 0.