Cosmic Vedic Astrology Predictor
Vedic Astrology Predictions
ज्योतिषीय भविष्यवाणी
ज्योतिषीयं भविष्यम्
Discover what the stars have in store for you
जानिए तारे आपके लिए क्या संदेश लाए हैं
ज्ञातव्यं भवतु यत् नक्षत्राणि भवतः कृते किं संदेशं आनयन्ति
Select your Rashi
अपनी राशि चुनें
राशिं चिनुत
// Add date
const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' };
const predictionDate = today.toLocaleDateString(undefined, options);
outputHTML += `
${translations[currentLanguage].name}: ${userName}
${predictionDate}
`;
// Display prediction
const predictionOutput = document.getElementById('predictionOutput');
predictionOutput.innerHTML = outputHTML;
predictionOutput.classList.remove('hidden');
// Show share buttons
document.getElementById('shareButtons').classList.remove('hidden');
// Scroll to prediction
predictionOutput.scrollIntoView({ behavior: 'smooth' });
}
// Share functions
function shareOnFacebook() {
const userName = document.getElementById('userName').value;
const rashi = document.getElementById('rashi').value;
const shareText = `Check out my ${rashi} Vedic astrology prediction!`;
const shareUrl = encodeURIComponent(window.location.href);
window.open(`https://www.facebook.com/sharer/sharer.php?u=${shareUrl}"e=${shareText}`, '_blank');
}
function shareOnWhatsApp() {
const userName = document.getElementById('userName').value;
const rashi = document.getElementById('rashi').value;
const shareText = `Check out my ${rashi} Vedic astrology prediction! ${window.location.href}`;
window.open(`https://wa.me/?text=${encodeURIComponent(shareText)}`, '_blank');
}
function shareOnTwitter() {
const userName = document.getElementById('userName').value;
const rashi = document.getElementById('rashi').value;
const shareText = `My ${rashi} Vedic astrology prediction is fascinating! Check yours at ${window.location.href}`;
window.open(`https://twitter.com/intent/tweet?text=${encodeURIComponent(shareText)}`, '_blank');
}
// Initialize
document.addEventListener('DOMContentLoaded', function() {
// Set current date as default for birth date
const today = new Date();
const formattedDate = today.toISOString().substr(0, 10);
document.getElementById('birthDate').value = formattedDate;
// Set current time as default for birth time
const now = new Date();
const hours = now.getHours().toString().padStart(2, '0');
const minutes = now.getMinutes().toString().padStart(2, '0');
document.getElementById('birthTime').value = `${hours}:${minutes}`;
// Show partner section when relationship prediction is selected
document.getElementById('rashi').addEventListener('change', function() {
document.getElementById('partnerSection').classList.remove('hidden');
});
});
0 Comments
Post a Comment