diff options
author | Minteck <contact@minteck.org> | 2023-03-03 07:04:02 +0100 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2023-03-03 07:04:02 +0100 |
commit | 29928887e733f3bc2c2baaf06dafd495a006753b (patch) | |
tree | 90f5fa4c5273f201cc2d26086298ad094d9dadda /assets/logo/banner.js | |
parent | 3d77712a9ab014635c75a33ea0f491bbda6aead3 (diff) | |
download | pluralconnect-29928887e733f3bc2c2baaf06dafd495a006753b.tar.gz pluralconnect-29928887e733f3bc2c2baaf06dafd495a006753b.tar.bz2 pluralconnect-29928887e733f3bc2c2baaf06dafd495a006753b.zip |
Updated 18 files and added 10 files (automated)
Diffstat (limited to 'assets/logo/banner.js')
-rw-r--r-- | assets/logo/banner.js | 32 |
1 files changed, 7 insertions, 25 deletions
diff --git a/assets/logo/banner.js b/assets/logo/banner.js index 38a88aa..3f41912 100644 --- a/assets/logo/banner.js +++ b/assets/logo/banner.js @@ -6,11 +6,7 @@ function timeAgo(time) { time = new Date(time).getTime(); } - let periods = ["sec.", "mn.", "hr.", "d.", "wk.", "mo.", "y.", "ages"]; - - if (bannerFrench) { - periods = ["sec.", "min.", "h.", "j.", "sem.", "mois", "an.", "des années"]; - } + let periods = ["sec", "min", "hr", "d", "wk", "mo", "y", "ages"]; let lengths = ["60", "60", "24", "7", "4.35", "12", "100"]; @@ -20,22 +16,12 @@ function timeAgo(time) { let tense; let period; - if (bannerFrench) { - if (difference <= 10 && difference >= 0) { - return "à l'instant"; - } else if (difference > 0) { - tense = "il y a"; - } else { - tense = "dans"; - } + if (difference <= 10 && difference >= 0) { + return "now"; + } else if (difference > 0) { + tense = "ago"; } else { - if (difference <= 10 && difference >= 0) { - return "now"; - } else if (difference > 0) { - tense = "ago"; - } else { - tense = "later"; - } + tense = "later"; } let j; @@ -48,11 +34,7 @@ function timeAgo(time) { period = periods[j]; - if (bannerFrench) { - return `${tense} ${difference} ${period}`; - } else { - return `${difference} ${period} ${tense}`; - } + return `${difference} ${period} ${tense}`; } async function refreshBanner(_, french) { |