Reddit JSON Robin Williams AMA feed

Developer
Size
3,481 Kb
Views
12,144

How do I make an reddit json robin williams ama feed?

Using the reddit JSON to create a quote generator. Went through and found all Robin Williams' responses (as a result some are: "Aw, thanks") then randomly display them.. What is a reddit json robin williams ama feed? How do you make a reddit json robin williams ama feed? This script and codes were developed by Rich Williams on 07 December 2022, Wednesday.

Reddit JSON Robin Williams AMA feed Previews

Reddit JSON Robin Williams AMA feed - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Reddit JSON Robin Williams AMA feed</title> <link rel='stylesheet prefetch' href='https://fonts.googleapis.com/css?family=Cabin+Condensed|Lobster|Open+Sans|Raleway'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="container"></div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Reddit JSON Robin Williams AMA feed - Script Codes CSS Codes

body { background: #272822;
}
.container { padding: 10px; position: relative;
}
.container .block { width: 400px; line-height: 1.4; position: absolute; font-size: 1.4em; -webkit-transition: font-size 5s, width 5s; -moz-transition: font-size 5s, width 5s; -o-transition: font-size 5s, width 5s; transition: font-size 5s, width 5s;
}
.container .block.grow { width: 600px; font-size: 1.5em;
}
.container .style1 { color: #F8F8F2; font-family: 'Cabin Condensed', sans-serif;
}
.container .style2 { color: #BED6FF; font-family: 'Lobster', cursive;
}
.container .style3 { color: #E6DB74; font-family: 'Open Sans', sans-serif;
}
.container .style4 { color: #79ABFF; font-family: 'Raleway', sans-serif;
}

Reddit JSON Robin Williams AMA feed - Script Codes JS Codes

var AMAs = { "RobinWilliams" : { "url" : "http://www.reddit.com/r/IAmA/comments/1n41x1/robin_williams_its_time_for_a_convoluted_stream/.json", "handle" : "RobinWilliamsHere" }, "BillMurray" : { "url" : "http://www.reddit.com/r/IAmA/comments/1vhjag/bill_murray_here_ok_ill_talk_ill_talk/.json", "handle" : "_BillMurray" }
}
var QuotePicker = (function () { var quotesArray = [], data, ama, content, self; function findQuotes ( item ) { for ( var i = 0, len = item.children.length; i < len; i ++ ) { var post = item.children[i].data; if ( post.replies ) { findQuotes(post.replies.data); } if ( post.author === ama.handle ) { quotesArray.push(post.body); } } } var QuotePicker = { init : function (_ama) { self = this; ama = _ama; $.get(ama.url, function (_data) { data = _data; content = data[1]; self.getQuotes(); }); }, getQuotes : function () { if ( data && content && !quotesArray.length ) { findQuotes(content.data); } }, getQuote : function () { if ( quotesArray.length ) { var index = Math.floor(Math.random() * quotesArray.length); return quotesArray[index]; } return "..."; } } return QuotePicker;
}());
var QuoteDisplay = (function (container) { var delay = 1000, timer = null, $container, oldDiv, newDiv; function showQuote () { if ( timer ) { window.clearTimeout(timer); } if ( oldDiv ) { oldDiv.fadeOut(2000, function () { $(this).remove(); }); } var quote = QuotePicker.getQuote(), quoteLength = quote.length, width = 400 + quoteLength * 0.5; var newDiv = $("<div />") .attr( "class", "block style" + Math.ceil(Math.random() * 4) ) .css({ "left" : Math.round(Math.random() * ($container.width() - width)) + "px", "top" : Math.round(Math.random() * 50) + "px", "font-size" : "1." + Math.round(Math.random() * 4) + "rem", "width" : width + "px" }) .html(quote) .hide(); $container.append(newDiv); newDiv.fadeIn(2000, function () { oldDiv = newDiv; }); delay = 5000 + 25 * quoteLength; console.log(delay); timer = window.setTimeout(showQuote, delay); } var QuoteDisplay = { init : function (_container) { $container = _container; showQuote(); } } return QuoteDisplay;
}());
QuotePicker.init(AMAs.RobinWilliams);
window.setTimeout(function () { QuoteDisplay.init($(".container"));
}, 2000);
Reddit JSON Robin Williams AMA feed - Script Codes
Reddit JSON Robin Williams AMA feed - Script Codes
Home Page Home
Developer Rich Williams
Username toneworm
Uploaded December 07, 2022
Rating 3
Size 3,481 Kb
Views 12,144
Do you need developer help for Reddit JSON Robin Williams AMA feed?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Rich Williams (toneworm) Script Codes
Create amazing love letters with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!