✓ Saved
Generating PDF...
Home Blog Tools Templates Q&A Series Pipeline About Services
Verification Tool

Amazon Product Verifier

Verify Amazon products for eBay reselling compliance. Check authenticity, brand restrictions, and listing eligibility in seconds.

0%
Free
Instant
Verification
PDF
Export Ready
0
Click Check
Saved Questionnaires 0
✓ آپ کے جوابات خودکار آپ کے براؤزر میں محفوظ ہو جاتے ہیں۔ صفحہ بند کریں یا دوبارہ کھولیں — ڈیٹا موجود رہے گا۔
'; fetch('/tools/av-pdf.php', { method: 'POST', headers: {'Content-Type': 'application/json'}, body: JSON.stringify({ html: fullHtml, filename: 'amazon_verification_' + slug + '_' + lang }) }) .then(function(res) { if (!res.ok) { return res.json().then(function(e){ throw new Error(e.error || 'Server error ' + res.status); }); } return res.blob(); }) .then(function(blob) { var url = URL.createObjectURL(blob); var a = document.createElement('a'); a.href = url; a.download = 'amazon_verification_' + slug + '_' + lang + '.pdf'; document.body.appendChild(a); a.click(); setTimeout(function(){ URL.revokeObjectURL(url); document.body.removeChild(a); }, 2000); loader.classList.remove('active'); }) .catch(function(err) { loader.classList.remove('active'); console.error('PDF error:', err); alert('PDF Error: ' + err.message); }); } if (lang === 'ur') { msg.textContent = '\u062c\u0648\u0627\u0628\u0627\u062a \u06a9\u0627 \u062a\u0631\u062c\u0645\u06c1 \u06c1\u0648 \u0631\u06c1\u0627 \u06c1\u06d2...'; urTranslateAndBuild(doRender); } else { doRender(buildPdfHtml('en')); } } function downloadTXT() { var items = buildPrintItems(currentLang); var now = new Date().toLocaleDateString('en-PK', { day: '2-digit', month: 'long', year: 'numeric' }); var idx = getIndex(); var meta = idx.find(function(q){ return q.id === activeQId; }); var qName = meta ? meta.name : ''; var lines = []; if (currentLang === 'ur') { lines.push('ایمیزون ویڈیو ویریفکیشن — سوالات اور جوابات'); } else { lines.push('Amazon Video Verification -- Q&A Preparation Sheet'); } if (qName) lines.push('Questionnaire: ' + qName); lines.push(now); lines.push(''); items.forEach(function(item) { if (item.type === 'section') { lines.push(''); lines.push('=== ' + item.text + ' ==='); lines.push(''); } else { if (item.trap) lines.push('[TRAP QUESTION]'); if (item.custom) lines.push('[CUSTOM QUESTION]'); lines.push('Q: ' + item.text); lines.push('A: ' + item.ans); lines.push(''); } }); var content = lines.join('\n'); var blob = new Blob([content], { type: 'text/plain;charset=utf-8' }); var url = URL.createObjectURL(blob); var a = document.createElement('a'); a.href = url; var slug = qName ? qName.replace(/[^a-zA-Z0-9]/g, '_').substring(0, 30) : 'questionnaire'; a.download = 'amazon_verification_' + slug + '_' + currentLang + '.txt'; document.body.appendChild(a); a.click(); document.body.removeChild(a); URL.revokeObjectURL(url); } function clearAllAnswers() { var msg = currentLang === 'ur' ? 'کیا واقعی سب صاف کرنا ہے؟' : 'Clear all answers in this questionnaire?'; if (!confirm(msg)) return; for (var i = 1; i <= TOTAL_DEFAULT; i++) { var e = document.getElementById('a' + i); if (e) { e.value = ''; e.style.height = 'auto'; } } customList.forEach(function(cq) { var e = document.getElementById('cqa_' + cq.id); if (e) { e.value = ''; e.style.height = 'auto'; } }); scheduleSave(); updateFormProgress(); } /* ==================== SYNC MODAL ==================== */ function getCookieUUID() { var m = document.cookie.match(/(?:^|;\s*)av_device=([a-f0-9\-]{36})/); return m ? m[1] : null; } function showSyncModal() { var uuid = _deviceUUID || getCookieUUID(); if (!uuid) { fetch(saveEndpoint + '?action=load', { credentials: 'include' }) .then(function(r) { return r.json(); }) .then(function(data) { _deviceUUID = data.uuid; _doShowSyncModal(data.uuid); }) .catch(function() { alert('Could not get sync link. Try again.'); }); return; } _doShowSyncModal(uuid); } function _doShowSyncModal(uuid) { var url = window.location.origin + window.location.pathname + '?sync=' + uuid; document.getElementById('sync-url-display').textContent = url; document.getElementById('sync-modal').classList.add('active'); } function closeSyncModal() { document.getElementById('sync-modal').classList.remove('active'); } function copySyncLink(evt) { var url = document.getElementById('sync-url-display').textContent; var btn = evt ? evt.target : null; var done = function() { if (btn) { var orig = btn.textContent; btn.textContent = '✅ Copied!'; setTimeout(function() { btn.textContent = orig; }, 2000); } }; if (navigator.clipboard && navigator.clipboard.writeText) { navigator.clipboard.writeText(url).then(done).catch(function() { var ta = document.createElement('textarea'); ta.value = url; document.body.appendChild(ta); ta.select(); document.execCommand('copy'); document.body.removeChild(ta); done(); }); } else { var ta = document.createElement('textarea'); ta.value = url; document.body.appendChild(ta); ta.select(); document.execCommand('copy'); document.body.removeChild(ta); done(); } } function connectFromLink() { var input = document.getElementById('sync-paste-input'); var msg = document.getElementById('sync-connect-msg'); if (!input) return; var val = input.value.trim(); var m = val.match(/[?&]sync=([a-f0-9\-]{36})/); if (!m) { if (msg) { msg.style.display='block'; msg.style.color='#EF4444'; msg.textContent='Invalid link. Copy the exact link from desktop Sync Link button.'; } return; } var uuid = m[1]; if (msg) { msg.style.display='block'; msg.style.color='var(--muted)'; msg.textContent='Connecting...'; } fetch(saveEndpoint + '?action=adopt&uuid=' + encodeURIComponent(uuid), { credentials: 'include' }) .then(function(r) { return r.json(); }) .then(function(data) { if (data && data.questionnaires && data.questionnaires.length) { setIndex(data.questionnaires); if (data.qdatas) { Object.keys(data.qdatas).forEach(function(id) { setQData(id, data.qdatas[id]); }); } serverSynced = true; if (msg) { msg.style.color='#059669'; msg.textContent=data.questionnaires.length + ' questionnaire(s) loaded successfully!'; } setTimeout(function() { renderDashboard(); }, 700); } else { if (msg) { msg.style.color='#EF4444'; msg.textContent='No questionnaires found. Use the correct Sync Link from your desktop.'; } } }) .catch(function() { if (msg) { msg.style.color='#EF4444'; msg.textContent='Connection failed. Check internet and try again.'; } }); } /* ==================== INIT ==================== */ document.addEventListener('DOMContentLoaded', function() { // Migrate old data format migrateOldData(); // Wire up modal key handlers (independent of server load) document.getElementById('modal-name-input').addEventListener('keydown', function(e) { if (e.key === 'Enter') modalConfirm(); if (e.key === 'Escape') closeModal(); }); document.getElementById('modal-create').addEventListener('click', function(e) { if (e.target === this) closeModal(); }); function initApp() { // Restore language (server may have updated localStorage) var sl; try { sl = localStorage.getItem('av-lang'); } catch(e) {} setLang(sl || 'en'); // Check URL hash for direct questionnaire link var hash = window.location.hash; if (hash && hash.indexOf('#q=') === 0) { var qId = hash.substring(3); var idx = getIndex(); var found = idx.find(function(q){ return q.id === qId; }); if (found) { openQuestionnaire(qId); return; } } renderDashboard(); } // Check for ?sync=UUID param — adopt source device data on mobile var _urlParams = new URLSearchParams(window.location.search); var _syncId = _urlParams.get('sync'); function _startInit() { loadFromServer(initApp); } if (_syncId && /^[a-f0-9\-]{36}$/.test(_syncId)) { // Clean URL immediately history.replaceState({}, '', window.location.pathname); // Adopt source device: server sets cookie + returns data fetch('/tools/av-save.php?action=adopt&uuid=' + encodeURIComponent(_syncId), { credentials: 'include' }).then(function(r) { return r.json(); }) .then(function(data) { if (data && data.questionnaires && data.questionnaires.length) { setIndex(data.questionnaires); if (data.qdatas) { Object.keys(data.qdatas).forEach(function(id) { setQData(id, data.qdatas[id]); }); } serverSynced = true; } initApp(); }).catch(function() { _startInit(); }); } else { _startInit(); } }); // Handle browser back/forward window.addEventListener('popstate', function(e) { var hash = window.location.hash; if (hash && hash.indexOf('#q=') === 0) { var qId = hash.substring(3); var idx = getIndex(); var found = idx.find(function(q){ return q.id === qId; }); if (found) { openQuestionnaire(qId); return; } } if (hasUnsavedChanges && activeQId) { if (history.pushState) history.pushState({qId: activeQId}, '', '#q=' + activeQId); pendingNavAction = function() { hasUnsavedChanges = false; showDashboard(true); }; openUnsavedModal(); return; } showDashboard(true); });