Reddit JSON Robin Williams AMA feed
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 - 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);
Developer | Rich Williams |
Username | toneworm |
Uploaded | December 07, 2022 |
Rating | 3 |
Size | 3,481 Kb |
Views | 12,144 |
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!
Name | Size |
Reverb keyboard | 4,507 Kb |
Catnip | 2,913 Kb |
Chooser | 2,682 Kb |
Text word map generator | 2,264 Kb |
Impossible typing test | 3,316 Kb |
Horrible looking fadey transition tabs | 4,246 Kb |
Weird spirally CSS thing | 2,338 Kb |
Slidey boxes | 2,302 Kb |
D3 simple interaction test | 2,327 Kb |
Little box shadow man and sun | 3,085 Kb |
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!
Name | Username | Size |
JQuery Viewport Size | Jeffpannone | 2,317 Kb |
Border image | JohnRiordan | 2,120 Kb |
Scifi-style Interative Form | Aaronchuo | 4,566 Kb |
Animated rainbow wave on canvas | Icodeforlove | 2,777 Kb |
Custom checkbox example | Capelo | 3,495 Kb |
Slick Slider | Wearebold | 5,913 Kb |
Drawing a Terminal with CSS | Lachlanjc | 3,185 Kb |
RWD- Mostly Fluid Layout Pattern | Marcocastro | 2,312 Kb |
Boxes | H3l1um | 2,563 Kb |
Find The Penguin | Lelder | 2,212 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!