`;
ul.appendChild(li);
allPosts.push(li);
});
}
// Search functionality
function filterPosts() {
const searchTerm = document.getElementById('search-box').value.toLowerCase();
let visibleCount = 0;
allPosts.forEach(post => {
const text = post.textContent.toLowerCase();
if (text.includes(searchTerm)) {
post.style.display = '';
visibleCount++;
} else {
post.style.display = 'none';
}
});
document.getElementById('postCount').textContent = visibleCount;
}
// Initialize feeds
window.addEventListener('DOMContentLoaded', () => {
const feeds = [
'https://www.laxmannepal.com.np/feeds/posts/default/-/Tools?published&alt=json-in-script&callback=labelthumbs',
];
feeds.forEach(url => {
const script = document.createElement('script');
script.src = url;
document.body.appendChild(script);
});
});