JSFiddle - React, Tailwind, and code Playground

by abeisgreat

JavaScript

i = 1;
(new Cannon("http://www.reddit.com/r/nsfw_gifs/.json")).projectile("data.children.*.data").reloader({after: "data.after"}).limit(1).fetcher(function (current, limit) {
    console.log('Fetching ' + current + ' of ' + limit);
}).rapidfire(function (projectile, cannon) {
    $.get('http://www.reddit.com' + projectile.permalink + '/.json', function (data) {
        $.each(data[1].data.children, function (index, comment) {
          var body = comment.data.body;
          var bodyRe = /\[Source.+\]\((.+)\)/;
          var source = (bodyRe.exec(body));
          if (source) {
            console.log(projectile.url + " : " + source[1]);
          }
        }); 
    });
});