Compare commits

...

11 commits

Author SHA1 Message Date
Andy Pan
b5a364d3a2 try to fix memory leaks
If the element is no longer in the DOM tree, stop its corresponding
setInterval in the next cycle.
2014-07-09 11:59:22 -04:00
Ryan McGeary
05a85b77f9 Merge pull request from ondrakula/patch-2
Update jquery.timeago.cs.js
2014-07-09 08:45:11 -04:00
ondrakula
0d2a2145b2 Update jquery.timeago.cs.js 2014-06-11 01:46:46 +02:00
Ryan McGeary
0399e804db Merge pull request from borkor/patch-1
Update jquery.timeago.rs.js
2014-06-05 08:38:38 -04:00
borkor
98d000543c Update jquery.timeago.rs.js 2014-06-05 13:50:12 +02:00
Ryan McGeary
c8b5b9365c Added codementor tracking to readme 2014-05-20 11:00:21 -04:00
Ryan McGeary
14ff438930 Updated help section in readme 2014-05-19 22:13:22 -04:00
Ryan McGeary
2409c9f88d Updated donation options in readme 2014-05-19 08:55:37 -04:00
Ryan McGeary
74736c8d07 Merge pull request from moreonion/master
Fix for Romanian and Turkish language files
2014-05-07 07:36:07 -04:00
more onion
4af2cf7135 Fix jquery.timeago.tr.js
Adjust Turkish language file to fit the others. File was being ignored because '$' wasn't mapped to 'jQuery'.
2014-05-07 11:14:18 +02:00
more onion
f7c9c359cd Fix jquery.timeago.ro.js
Adjust Romanian language file to fit the others. File was being ignored because '$' wasn't mapped to 'jQuery'.
2014-05-07 11:09:05 +02:00
6 changed files with 54 additions and 25 deletions

View file

@ -4,10 +4,26 @@ Timeago is a jQuery plugin that makes it easy to support automatically updating
fuzzy timestamps (e.g. "4 minutes ago" or "about 1 day ago") from ISO 8601
formatted dates and times embedded in your HTML (à la microformats).
**If you like this project, please help by donating.**
## How You Can Help
* Gittip: https://www.gittip.com/rmm5t/
* Bitcoin: `1wzBnMjWVZfpiFMc5i2nzKT7sCBaZNfLK`
**If you like this project, please help. [Donate via Gittip][gittip] or [buy me a coffee with Bitcoin][bitcoin].**<br>
[![Gittip](http://img.shields.io/gittip/rmm5t.svg)][gittip]
[![Bitcoin](http://img.shields.io/badge/bitcoin-buy%20me%20a%20coffee-brightgreen.svg)][bitcoin]
**[Bitcoin][bitcoin]**: `1rmm5tv6f997JK5bLcGbRCZyVjZUPkQ2m`<br>
[![Bitcoin Donation][bitcoin-qr-small]][bitcoin-qr-big]
## Need Help?
**You can [book a session with me on Codementor][codementor].**<br>
[![Book a Codementor session](http://img.shields.io/badge/codementor-book%20a%20session-orange.svg)][codementor]
[gittip]: https://www.gittip.com/rmm5t/ "Donate to rmm5t for open source!"
[bitcoin]: https://blockchain.info/address/1rmm5tv6f997JK5bLcGbRCZyVjZUPkQ2m "Buy rmm5t a coffee for open source!"
[bitcoin-scheme]: bitcoin:1rmm5tv6f997JK5bLcGbRCZyVjZUPkQ2m?amount=0.01&label=Coffee%20to%20rmm5t%20for%20Open%20Source "Buy rmm5t a coffee for open source!"
[bitcoin-qr-small]: http://chart.apis.google.com/chart?cht=qr&chs=150x150&chl=bitcoin%3A1rmm5tv6f997JK5bLcGbRCZyVjZUPkQ2m%3Famount%3D0.01%26label%3DCoffee%2520to%2520rmm5t%2520for%2520Open%2520Source
[bitcoin-qr-big]: http://chart.apis.google.com/chart?cht=qr&chs=500x500&chl=bitcoin%3A1rmm5tv6f997JK5bLcGbRCZyVjZUPkQ2m%3Famount%3D0.01%26label%3DCoffee%2520to%2520rmm5t%2520for%2520Open%2520Source
[codementor]: https://www.codementor.io/rmm5t?utm_campaign=profile&utm_source=button-rmm5t&utm_medium=shields "Book a session with rmm5t on Codementor!"
## Usage

View file

@ -175,6 +175,13 @@
};
function refresh() {
//check if it's still visible
if(!$.contains(document.documentElement,this)){
//stop if it has been removed
$(this).timeago("dispose");
return this;
}
var data = prepareData(this);
var $s = $t.settings;

View file

@ -1,18 +1,24 @@
// Czech
jQuery.timeago.settings.strings = {
prefixAgo: "před",
prefixFromNow: null,
suffixAgo: null,
suffixFromNow: null,
seconds: "méně než minutou",
minute: "minutou",
minutes: "%d minutami",
hour: "hodinou",
hours: "%d hodinami",
day: "1 dnem",
days: "%d dny",
month: "1 měsícem",
months: "%d měsíci",
year: "1 rokem",
years: "%d roky"
};
(function() {
function f(n, d, a) {
return a[d>=0 ? 0 : a.length==2 || n<5 ? 1 : 2];
}
jQuery.timeago.settings.strings = {
prefixAgo: 'před',
prefixFromNow: 'za',
suffixAgo: null,
suffixFromNow: null,
seconds: function(n, d) {return f(n, d, ['méně než minutou', 'méně než minutu'])},
minute: function(n, d) {return f(n, d, ['minutou', 'minutu'])},
minutes: function(n, d) {return f(n, d, ['%d minutami', '%d minuty', '%d minut'])},
hour: function(n, d) {return f(n, d, ['hodinou', 'hodinu'])},
hours: function(n, d) {return f(n, d, ['%d hodinami', '%d hodiny', '%d hodin'])},
day: function(n, d) {return f(n, d, ['%d dnem', '%d den'])},
days: function(n, d) {return f(n, d, ['%d dny', '%d dny', '%d dní'])},
month: function(n, d) {return f(n, d, ['%d měsícem', '%d měsíc'])},
months: function(n, d) {return f(n, d, ['%d měsící', '%d měsíce', '%d měsíců'])},
year: function(n, d) {return f(n, d, ['%d rokem', '%d rok'])},
years: function(n, d) {return f(n, d, ['%d lety', '%d roky', '%d let'])}
};
})();

View file

@ -1,5 +1,5 @@
// Romanian
$.timeago.settings.strings = {
jQuery.timeago.settings.strings = {
prefixAgo: "acum",
prefixFromNow: "in timp de",
suffixAgo: "",
@ -15,4 +15,4 @@ $.timeago.settings.strings = {
months: "%d luni",
year: "un an",
years: "%d ani"
};
};

View file

@ -39,7 +39,7 @@
months: function (value) {
return numpf(value, "%d mesec", "%d meseca", "%d meseci");
},
year: "pre godinu dana",
year: "godinu dana",
years: function (value) {
return numpf(value, "%d godinu", "%d godine", "%d godina");
},

View file

@ -1,5 +1,5 @@
// Turkish
jQuery.extend($.timeago.settings.strings, {
jQuery.timeago.settings.strings = {
suffixAgo: 'önce',
suffixFromNow: null,
seconds: '1 dakikadan',
@ -13,4 +13,4 @@ jQuery.extend($.timeago.settings.strings, {
months: '%d ay',
year: '1 yıl',
years: '%d yıl'
});
};