கே
வாசகர் கேள்வி
வாசகர் கேள்வி ஏற்றப்படுகிறது...
✓ சாஸ்திர விளக்கம் (ஸ்ரீ நரசிம்மன் ஸ்வாமி):
பதில் ஏற்றப்படுகிறது...
`;
var shradhdhaCard = document.getElementById('shradhdha-prominent-home-card');
if (shradhdhaCard) {
container.insertBefore(cardWrapper, shradhdhaCard.nextSibling);
} else {
container.insertBefore(cardWrapper, insertTarget.nextSibling);
}
var refreshBtn = document.getElementById('theetuRefreshBtn');
if (refreshBtn) {
refreshBtn.onclick = fetchTheetuRandom;
}
fetchTheetuRandom();
}
function fetchTheetuRandom() {
var qEl = document.getElementById('theetuQuestion');
var aEl = document.getElementById('theetuAnswer');
var authorEl = document.getElementById('theetuAuthor');
var dateEl = document.getElementById('theetuDate');
if (!qEl) return;
fetch('/api/theetu/random-featured')
.then(function(r) { return r.json(); })
.then(function(d) {
if (d && d.question) {
qEl.innerText = d.question;
authorEl.innerText = d.author || 'வாசகர் கேள்வி';
dateEl.innerText = d.date ? '(' + d.date.split(' ')[0] + ')' : '';
var ans = d.answer || 'விபரம் முழுப் பக்கத்தில் காண்க.';
if (ans.length > 170) ans = ans.substring(0, 170) + '...';
aEl.innerText = ans;
}
})
.catch(function() {});
}
setInterval(checkAndInjectCard, 800);
})();