aboutsummaryrefslogtreecommitdiff
path: root/.themes
diff options
context:
space:
mode:
authorBrandon Mathis <brandon@imathis.com>2011-09-02 16:43:49 -0500
committerBrandon Mathis <brandon@imathis.com>2011-09-02 16:43:49 -0500
commitbd44056045af5990f5e65d0d7dd3edcc5c526b70 (patch)
tree8c4d39297e007898138e6c647ee6b54011b2620d /.themes
parent376a22a355ad358189895e3ba72e9cf4b2b05a07 (diff)
downloadmy_new_personal_website-bd44056045af5990f5e65d0d7dd3edcc5c526b70.tar.xz
my_new_personal_website-bd44056045af5990f5e65d0d7dd3edcc5c526b70.zip
fixed bug with twitter feed where it would sometimes say "undefined" if the post was more than a month old
Diffstat (limited to '')
-rw-r--r--.themes/classic/source/javascripts/twitter.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/.themes/classic/source/javascripts/twitter.js b/.themes/classic/source/javascripts/twitter.js
index 1f1b2f91..a4e85557 100644
--- a/.themes/classic/source/javascripts/twitter.js
+++ b/.themes/classic/source/javascripts/twitter.js
@@ -68,7 +68,7 @@ function prettyDate(time) {
var diff = ((current_date_full - date.getTime()) / 1000);
var day_diff = Math.floor(diff / 86400);
- if (isNaN(day_diff) || day_diff < 0 || day_diff >= 31) return;
+ if (isNaN(day_diff) || day_diff < 0) return "<span>&infin;</span>";
return day_diff == 0 && (
diff < 60 && say.just_now ||
@@ -78,5 +78,5 @@ function prettyDate(time) {
diff < 86400 && Math.floor(diff / 3600) + say.hours_ago) ||
day_diff == 1 && say.yesterday ||
day_diff < 7 && day_diff + say.days_ago ||
- day_diff < 31 && Math.ceil(day_diff / 7) + say.weeks_ago;
+ day_diff > 7 && Math.ceil(day_diff / 7) + say.weeks_ago;
}