Files
kidsai/fix-placeholder.js
root 500bd192d5 Initial commit: KidsAI Explorer with complete functionality
- Complete KidsAI Explorer application
- Multi-language support (English/German)
- AI-powered educational guidance using OpenAI
- Interactive chat interface for children
- Proper placeholder translation fixes
- Mobile-responsive design
- Educational framework for critical thinking
2025-07-13 16:59:42 +02:00

27 lines
1.1 KiB
JavaScript

// Force update placeholder for KidsAI
console.log('🔧 Force updating placeholder...');
// Check if kidsAI is available
if (typeof window.kidsAI !== 'undefined') {
console.log('✅ KidsAI instance found');
window.kidsAI.debugTranslatePlaceholder();
} else {
console.log('❌ KidsAI instance not found, trying manual approach...');
// Manual approach
const input = document.getElementById('question-input');
if (input && typeof translations !== 'undefined') {
const currentLang = localStorage.getItem('kidsai-language') || 'en';
console.log('Current language:', currentLang);
if (translations[currentLang] && translations[currentLang]['question-placeholder']) {
input.placeholder = translations[currentLang]['question-placeholder'];
console.log('✅ Manually updated placeholder to:', translations[currentLang]['question-placeholder']);
} else {
console.log('❌ Translation not found');
}
} else {
console.log('❌ Input element or translations not found');
}
}