diff options
author | Brandon Mathis <brandon@imathis.com> | 2011-08-04 16:03:21 -0700 |
---|---|---|
committer | Brandon Mathis <brandon@imathis.com> | 2011-08-04 16:03:21 -0700 |
commit | 3a599d415932af8ff336ce0632e309f37d5747f4 (patch) | |
tree | 83acf819cc95824091fca78a9716a5f9adbde3d6 | |
parent | ee0899dcadd4dfdd790fe5845d2c393c4d6a9bff (diff) | |
parent | 81dcb0301be3529264411783ccd893ec0e20a178 (diff) | |
download | my_new_personal_website-3a599d415932af8ff336ce0632e309f37d5747f4.tar.xz my_new_personal_website-3a599d415932af8ff336ce0632e309f37d5747f4.zip |
Merge pull request #73 from pilif/twitter-js-scope-fix
correctly scope locals
-rw-r--r-- | .themes/classic/source/javascripts/twitter.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/.themes/classic/source/javascripts/twitter.js b/.themes/classic/source/javascripts/twitter.js index 676619e1..1f1b2f91 100644 --- a/.themes/classic/source/javascripts/twitter.js +++ b/.themes/classic/source/javascripts/twitter.js @@ -1,13 +1,15 @@ // JSON-P Twitter fetcher for Octopress // (c) Brandon Mathis // MIT Lisence function getTwitterFeed(user, count, replies) { - feed = new jXHR(); + var feed = new jXHR(); + feed.onerror = function (msg,url) { $('#tweets li.loading').addClass('error').text("Twitter's busted"); } feed.onreadystatechange = function(data){ if (feed.readyState === 4) { var tweets = new Array(); + var i = 0; for (i in data){ if(tweets.length < count){ if(replies || data[i].in_reply_to_user_id == null){ |