Terms of Use Generator
Generate standard legal snippets for your website.
1. Basic Information
2. Features & Clauses
Please read these Terms of Use ("Terms", "Terms of Use") carefully before using the website website (the "Service") operated by Company Name ("us", "we", or "our").
Your access to and use of the Service is conditioned on your acceptance of and compliance with these Terms. These Terms apply to all visitors, users, and others who access or use the Service.
By accessing or using the Service you agree to be bound by these Terms. If you disagree with any part of the terms then you may not access the Service.
We may terminate or suspend access to our Service immediately, without prior notice or liability, for any reason whatsoever, including without limitation if you breach the Terms.
These Terms shall be governed and construed in accordance with the laws of Jurisdiction, without regard to its conflict of law provisions.
We reserve the right, at our sole discretion, to modify or replace these Terms at any time. If a revision is material we will try to provide at least 30 days' notice prior to any new terms taking effect. What constitutes a material change will be determined at our sole discretion.
If you have any questions about these Terms, please contact us at: email@example.com.
When you create an account with us, you must provide us information that is accurate, complete, and current at all times. Failure to do so constitutes a breach of the Terms, which may result in immediate termination of your account on our Service.
You are responsible for safeguarding the password that you use to access the Service and for any activities or actions under your password, whether your password is with our Service or a third-party service.
`; } // Content Clause if (inputs.content.checked) { html += `Our Service allows you to post, link, store, share and otherwise make available certain information, text, graphics, videos, or other material ("Content"). You are responsible for the Content that you post to the Service, including its legality, reliability, and appropriateness.
By posting Content to the Service, you grant us the right and license to use, modify, publicly perform, publicly display, reproduce, and distribute such Content on and through the Service.
`; } // Subscriptions Clause if (inputs.subs.checked) { html += `Some parts of the Service are billed on a subscription basis ("Subscription(s)"). You will be billed in advance on a recurring and periodic basis ("Billing Cycle"). Billing cycles are set either on a monthly or annual basis, depending on the type of subscription plan you select when purchasing a Subscription.
At the end of each Billing Cycle, your Subscription will automatically renew under the exact same conditions unless you cancel it or ${inputs.company.value || "we"} cancels it.
`; } // Standard IP Clause (Always included) html += `The Service and its original content (excluding Content provided by users), features and functionality are and will remain the exclusive property of ${inputs.company.value || "[Company Name]"} and its licensors. The Service is protected by copyright, trademark, and other laws of both the ${inputs.location.value || "[Country]"} and foreign countries.
`; // Standard Links Clause (Always included) html += `Our Service may contain links to third-party web sites or services that are not owned or controlled by ${inputs.company.value || "[Company Name]"}.
${inputs.company.value || "[Company Name]"} has no control over, and assumes no responsibility for, the content, privacy policies, or practices of any third party web sites or services. You further acknowledge and agree that ${inputs.company.value || "[Company Name]"} shall not be responsible or liable, directly or indirectly, for any damage or loss caused or alleged to be caused by or in connection with use of or reliance on any such content, goods or services available on or through any such web sites or services.
`; outputs.clauses.innerHTML = html; } // Event Listeners Object.values(inputs).forEach(input => { input.addEventListener('input', updatePreview); input.addEventListener('change', updatePreview); }); // --- Export Actions --- // Copy Text document.getElementById('tou-copy-text').addEventListener('click', () => { const doc = document.getElementById('tou-document'); // Simple text extraction (preserves basic breaks) const text = doc.innerText; navigator.clipboard.writeText(text).then(() => { const btn = document.getElementById('tou-copy-text'); const origHtml = btn.innerHTML; btn.innerHTML = ' Copied!'; setTimeout(() => btn.innerHTML = origHtml, 2000); }); }); // Copy HTML document.getElementById('tou-copy-html').addEventListener('click', () => { const doc = document.getElementById('tou-document'); // Get HTML string const html = doc.innerHTML; // Optional: Clean up classes for cleaner embedding const cleanHtml = html.replace(/class="tou-highlight"/g, '').replace(/class="tou-clause-title"/g, 'style="font-weight:bold; margin-top:20px;"'); navigator.clipboard.writeText(cleanHtml).then(() => { const btn = document.getElementById('tou-copy-html'); const origHtml = btn.innerHTML; btn.innerHTML = ' Copied!'; setTimeout(() => btn.innerHTML = origHtml, 2000); }); }); // Download PDF document.getElementById('tou-export-pdf').addEventListener('click', async () => { const { jsPDF } = window.jspdf; const element = document.getElementById('tou-document'); const btn = document.getElementById('tou-export-pdf'); const origText = btn.innerHTML; btn.innerHTML = ' Generating...'; try { // Use HTML2Canvas to capture styling const canvas = await html2canvas(element, { scale: 2 }); const imgData = canvas.toDataURL('image/png'); const pdf = new jsPDF('p', 'mm', 'a4'); const pdfWidth = pdf.internal.pageSize.getWidth(); const pdfHeight = pdf.internal.pageSize.getHeight(); const imgProps = pdf.getImageProperties(imgData); const imgHeight = (imgProps.height * pdfWidth) / imgProps.width; // Multi-page handling (Basic implementation) // If content fits on one page: if (imgHeight <= pdfHeight) { pdf.addImage(imgData, 'PNG', 0, 0, pdfWidth, imgHeight); } else { // For simplicity in this snippet tool, we scale or just print first page. // A complex text-wrapping PDF generator usually requires direct text drawing (pdf.text) // rather than image snapshotting for best multi-page results. // Here we default to snapshot for style fidelity. pdf.addImage(imgData, 'PNG', 0, 0, pdfWidth, imgHeight); } const filename = `${inputs.name.value || "Website"}_TermsOfUse.pdf`; pdf.save(filename); } catch (err) { console.error(err); alert("Error generating PDF"); } finally { btn.innerHTML = origText; } }); // Init updatePreview(); });