refreshSeconds -> refreshMillis

This commit is contained in:
Ryan McGeary 2008-07-20 16:08:59 -04:00
parent 9234d84677
commit 0000974025
2 changed files with 6 additions and 4 deletions

View file

@ -1,5 +1,5 @@
/*
* Time Ago (for jQuery) version: 0.2 (07/19/2008)
* Time Ago (for jQuery) version: 0.2.99 (07/19/2008)
* @requires jQuery v1.2 or later
*
* Timeago is a jQuery plugin that makes it easy to support automatically
@ -22,7 +22,7 @@
$.extend($.timeago, {
settings: {
refreshSeconds: 60
refreshMillis: 60000
},
inWords: function(distanceMillis) {
var seconds = distanceMillis / 1000;
@ -59,8 +59,8 @@
self.each(refresh);
var $s = $.timeago.settings;
if ($s.refreshSeconds > 0) {
setInterval(function() { self.each(refresh); }, ($s.refreshSeconds * 1000));
if ($s.refreshMillis > 0) {
setInterval(function() { self.each(refresh); }, ($s.refreshMillis));
}
};

View file

@ -65,6 +65,8 @@
<abbr class="todate" title="1978-12-19T02:17:00+0900"></abbr> [from +0900]<br />
<h1>Wording unit tests:</h1>
<abbr class="towords" title="-60"></abbr> [-60 sec]<br />
<abbr class="towords" title="-30"></abbr> [-30 sec]<br />
<abbr class="towords" title="-1"></abbr> [-1 sec]<br />
<abbr class="towords" title="0"></abbr> [0 sec]<br />
<abbr class="towords" title="30"></abbr> [30 sec]<br />