Preserve already present title attributes in time tags. #75

Merged
merged 2 commits into from May 10, 2012

Conversation

Projects
None yet
2 participants
Contributor

jgraichen commented May 10, 2012

I'm using time tags that already have a title attribute, but jquery-timeago always override that attribute.

Example:
May 10, 2012

I want browsers with disabled JavaScript to display "May 10, 2012", while browsers with JavaScript should display "x times ago". But the title attribute should always be "May 10, 2012 10:06" (similar to GitHub dashboard) to allow a different human readable time format for title and tag content.

My patch only checks if a title attribute exists if the tag is a time tag to be backward compatible with current behavior and a title attribute will still be set if no one is given.

rmm5t merged commit b78598f into rmm5t:master May 10, 2012

Owner

rmm5t commented May 10, 2012

Thanks for this! Good work. Solid pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment