vendor/assets/javascripts/jquery.timeago.coffee in h2ocube_rails_assets-0.0.19 vs vendor/assets/javascripts/jquery.timeago.coffee in h2ocube_rails_assets-0.0.20

- old
+ new

@@ -1,7 +1,5 @@ -#= require jquery - # Smart Time Ago v0.1.1 # Copyright 2012, Terry Tai, Pragmatic.ly # https://pragmatic.ly/ # Licensed under the MIT license. @@ -69,11 +67,11 @@ absolutTime = @parse(timeString) "#{@options.lang.prefixes.ago}#{@distanceOfTimeInWords(absolutTime)}#{@options.lang.suffix}" parse: (iso8601) -> timeStr = $.trim(iso8601) - timeStr = timeStr.replace(/\.\d\d\d+/,"") + timeStr = timeStr.replace(/\.\d+/,"") timeStr = timeStr.replace(/-/,"/").replace(/-/,"/") timeStr = timeStr.replace(/T/," ").replace(/Z/," UTC") timeStr = timeStr.replace(/([\+\-]\d\d)\:?(\d\d)/," $1$2") new Date(timeStr); @@ -116,10 +114,10 @@ @each -> $this = $(this) data = $this.data("timeago") if (!data) $this.data("timeago", new TimeAgo(this, options)) - if (typeof options is 'string') + else if (typeof options is 'string') data[options]() $.fn.findAndSelf = (selector) -> this.find(selector).add(this.filter(selector))