jquery-timeago icon indicating copy to clipboard operation
jquery-timeago copied to clipboard

Instance-specific settings

Open jacaetevha opened this issue 11 years ago • 0 comments

It would be very useful to allow for instance-specific settings. As it is, we have to override the default settings, instantiate our timeagos, and then reset the default settings.

I'd like to do:

$.timeago(allowFuture: true, strings.suffixFromNow: 'remaining')

but I'm currently doing:

futureOrNot = $.timeago.settings.allowFuture
suffixFromNow = $.timeago.settings.strings.suffixFromNow
$.timeago.settings.allowFuture = true
$.timeago.settings.strings.suffixFromNow = 'remaining'
$.timeago()
$.timeago.settings.allowFuture = futureOrNot
$.timeago.settings.strings.suffixFromNow = suffixFromNow

jacaetevha avatar Mar 25 '13 14:03 jacaetevha