Home › Forums › JavaScript › getting rid of the time stamp on my twitter feed
- This topic is empty.
-
AuthorPosts
-
May 26, 2010 at 4:39 pm #29031
kloy
MemberI just added a twitter feed to my site.
Though it has a time stamp on it that i would like to get rid of.
I don’t know enough about JS to know how to alter this code.
It looks like this is the section that needs the change. I tried taking the whole section out and it the entire feed disappears.
Here is my site
http://www.palettedesign.comI got the code from–
http://tweet.seaofclouds.com/Any help is appreciated. Thanks!!
Code:function relative_time(time_value) {
var parsed_date = parse_date(time_value);
var relative_to = (arguments.length > 1) ? arguments[1] : new Date();
var delta = parseInt((relative_to.getTime() – parsed_date) / 1000);
var pluralize = function (singular, n) {
return ” + n + ‘ ‘ + singular + (n == 1 ? ” : ‘s’);
};
if(delta < 60) { return 'less than a minute ago'; } else if(delta < (60*60)) { return 'about ' + pluralize("minute", parseInt(delta / 60)) + ' ago'; } else if(delta < (24*60*60)) { return 'about ' + pluralize("hour", parseInt(delta / 3600)) + ' ago'; } else { return 'about ' + pluralize("day", parseInt(delta / 86400)) + ' ago'; } }May 27, 2010 at 2:51 pm #76664david_v
MemberHi Kloy,
You have two options:
1. Set the anchor tag to display none.
Code:.tweet_time a { display: none; }2. Modify the JS file to provide an option to display the date.
Line 18 & 19:
Change this:Code:query: null // [string] optional search query
};To This:
Code:query: null // [string] optional search query
date: 1 // [integer] 1 = yes, 0 = no
};Line 148
Change this:
Code:var date = ‘‘+relative_time(item.created_at)+’‘;To This:
Code:var date_template = ‘‘+relative_time(item.created_at)+’‘;var date = (s.date ? date_template : ”);
Finally, add the date option to your HTML page:
Code:Best regards,
David
May 28, 2010 at 1:31 pm #76695kloy
MemberThanks David!!
Option one did the trick!! -
AuthorPosts
- The forum ‘JavaScript’ is closed to new topics and replies.