Blog/themes/freemind/source/js/foxsay.js

20 lines
484 B
JavaScript
Raw Normal View History

2022-08-02 01:36:34 +02:00
let parser = new RSSParser();
parser.parseURL('https://foxsay.southfox.me/@SouthFox.rss', function(err, feed) {
if (err) throw err;
for (let i = 0; i < 10; i++) {
const entry = feed.items[i];
printPost(entry);
}
});
2022-03-16 15:24:24 +01:00
2022-08-02 01:36:34 +02:00
function printPost(entry) {
section = document.createElement("section");
section.classList.add('item');
popContent = entry.contentSnippet;
section.innerHTML = popContent;
blogs = document.getElementById('foxsay');
blogs.append(section);
}