Created
September 13, 2012 02:46
-
-
Save UnquietCode/3711511 to your computer and use it in GitHub Desktop.
Revisions
-
UnquietCode revised this gist
Sep 14, 2012 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,10 +2,11 @@ <head> <script type="text/javascript" src="jquery-1.8.1.min.js"></script> <script type="text/javascript"> <!-- use the url that your twitter widget is using to retrieve the tweet data --> $(function() { $.getJSON("http://cdn.syndication.twimg.com/widgets/timelines/246079887021051904?dnt=true&domain=unquietcode.com&lang=en&callback=?", function(data) { var tweets = $(data.body).find('li.tweet'); Tweets = []; -
UnquietCode revised this gist
Sep 14, 2012 . 1 changed file with 24 additions and 30 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,37 +1,31 @@ <html> <head> <script type="text/javascript" src="jquery-1.8.1.min.js"></script> <script type="text/javascript"> <!-- use the url that your twitter widget is using to retrieve the tweet data --> $(function() { $.getJSON("http://cdn.syndication.twimg.com/widgets/timelines/246079887021051904?dnt=true&domain=unquietcode.com&lang=en&t=1497324&callback=?", function(data) { var tweets = $(data.body).find('li.tweet'); Tweets = []; for (var i=0; i < tweets.length; ++i) { var cur = $(tweets[i]); var tweet = {}; tweet.authorFullName = cur.find("span.full-name span.p-name").html(); tweet.authorUserName = cur.find("span.p-nickname b").html(); tweet.date = cur.find("a.u-url").attr("data-datetime"); tweet.id = cur.attr("data-tweet-id"); tweet.text = $.trim(cur.find("p.e-entry-title").html()); Tweets.push(tweet); } }); }); </script> </head> <body> <div>Hi mom!</div> </body> </html> -
UnquietCode created this gist
Sep 13, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,37 @@ <html> <head> <script type="text/javascript" src="http://code.jquery.com/jquery-1.8.1.min.js"></script> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs"); function extractTweets() { var tweets = $('#tweetHolder iframe').contents().find('li.tweet'); var tweetObjects = []; for (var i=0; i < tweets.length; ++i) { var cur = $(tweets[i]); var tweet = {}; tweet.authorFullName = cur.find("span.full-name span.p-name").html(); tweet.authorUserName = cur.find("span.p-nickname b").html(); tweet.date = cur.find("a.u-url").attr("data-datetime"); tweet.id = cur.attr("data-tweet-id"); tweet.text = $.trim(cur.find("p.e-entry-title").html()); tweetObjects.push(tweet); } return tweetObjects; } </script> </head> <body> <div id="tweetHolder" style="display:none"> <a class="twitter-timeline" data-dnt=true href="https://twitter.com/UnquietCode" data-widget-id="246069621969518592"></a> </div> </body> </html>