JSFiddle - React, Tailwind, and code Playground

by Ezra

HTML

<div id="box"></div>

JavaScript

var fixMarkup = function(html) {
    var proxy = new Element("div", {
        html: html
    });
    proxy.getElements("a > img !").each(function(el) {
        el.set("rel", "lightbox");
    });

    var html = proxy.innerHTML;
    proxy.destroy();
    return html;
};

new Request.JSONP(
{
    url: 'http://nicekiwi.blogspot.com/feeds/posts/default?alt=json',
    onComplete: function(jsonData)
    {
        var newsGroup = new Element('div').adopt(
            new Element('h1', {text:jsonData.feed.title.$t}),
            new Element('ul', {id:'newsGroup'})
        );

        newsGroup.inject($('box'), 'bottom');
        
        var items = jsonData.feed.entry;

        Array.each(items, function(entry)
        {
            var li = new Element('li').adopt(
                new Element('h2', {text:entry.title.$t}),
                new Element('time', {text:entry.published.$t}),
                new Element('div', {html:fixMarkup(entry.content.$t)})
            );
            li.inject($('newsGroup'), 'bottom');
        });
    }
}).send();