Runtime options #3

weppos opened this Issue Dec 27, 2009 · 5 comments


None yet
4 participants

weppos commented Dec 27, 2009

The plugins provide a global configuration hash but it doesn't offer the ability to overwrite a specific setting at runtine like the most part of jQuery plugin do.

It would be nice to provide support for an options parameter.

jQuery(function($) {
  if ($.timeago) {
    $.timeago.settings.allowFuture = false;


    $('#expiring abbr.timeago').timeago({ allowFuture: true, range: 30 });
    $('#expired abbr.timeago').timeago({ allowFuture: false, range: 0 });

rmm5t commented Jan 4, 2010

Agreed. This is something I've been meaning to do for a while.

Has there / will there be any activity on this? I'd attempt to do it myself, but I'm sure I'd just butcher it.

Just sent a pull request that adds this functionality:

Awesome, you're a rock star. Setting the options is done as follows.

$("time.timeago-nosuffix").timeago({ strings: { suffixAgo: ""} });

rmm5t commented Mar 7, 2013

Sorry for neglecting this project somewhat, but I'm on a kick to refocus efforts again while planning a 2.0 (rewrite) release. Closing this issue request out in favor of #24.

@rmm5t rmm5t closed this Mar 7, 2013

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