body {
background-color: #f8f9fa;
font-family: 'Arial', sans-serif;
}
h2 {
color: #007bff;
}
.card {
background-color: #fff;
border-radius: 10px;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
#privacyPolicyText {
background-color: #f1f1f1;
border-radius: 5px;
padding: 20px;
font-family: 'Courier New', Courier, monospace;
white-space: pre-wrap;
word-wrap: break-word;
}
button {
font-size: 16px;
padding: 10px 20px;
border-radius: 5px;
}
document.getElementById('privacy-form').addEventListener('submit', function(event) {
event.preventDefault();
// Retrieve form values
const companyName = document.getElementById('companyName').value;
const websiteURL = document.getElementById('websiteURL').value;
const dataCollection = document.getElementById('dataCollection').value;
const contactEmail = document.getElementById('contactEmail').value;
// Generate Privacy Policy Text
let privacyPolicyText = `
Privacy Policy for ${companyName}
At ${companyName}, accessible from ${websiteURL}, one of our main priorities is the privacy of our visitors.
This Privacy Policy document contains types of information that is collected and recorded by ${companyName} and how we use it.
1. Information We Collect:
We collect the following types of data:
- ${dataCollection === 'both' ? 'Personal Information and Usage Data' : dataCollection === 'personal' ? 'Personal Information' : 'Usage Data'}.
2. How We Use Your Information:
- To improve user experience and service
- To contact you with important updates or offers
3. Sharing of Your Information:
We do not sell or rent any personal information.
4. Your Rights:
- You can access, update, or delete your data by contacting us at ${contactEmail}.
5. Changes to This Privacy Policy:
We may update our Privacy Policy from time to time.
For more information, please contact us at ${contactEmail}.
`;
// Display Privacy Policy
document.getElementById('privacyPolicyText').innerText = privacyPolicyText;
document.getElementById('privacyPolicyOutput').style.display = 'block';
});
document.getElementById('resetBtn').addEventListener('click', function() {
// Reset form and output
document.getElementById('privacy-form').reset();
document.getElementById('privacyPolicyOutput').style.display = 'none';
});