diff options
author | Max Kostikov <max@kostikov.co> | 2018-10-14 22:45:11 +0200 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2018-10-14 22:45:11 +0200 |
commit | ce52c27a8a4f0837b06a761c20cd097966cd47e8 (patch) | |
tree | 09d3b3ff7f34ee7e622ce56de1ea36209c12c298 /view | |
parent | f9c3b80780ce2e3244d3cf4acd31918b519ce8ae (diff) | |
download | volse-hubzilla-ce52c27a8a4f0837b06a761c20cd097966cd47e8.tar.gz volse-hubzilla-ce52c27a8a4f0837b06a761c20cd097966cd47e8.tar.bz2 volse-hubzilla-ce52c27a8a4f0837b06a761c20cd097966cd47e8.zip |
Update main.js
Diffstat (limited to 'view')
-rw-r--r-- | view/js/main.js | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/view/js/main.js b/view/js/main.js index 71bb86df5..085bc8d0d 100644 --- a/view/js/main.js +++ b/view/js/main.js @@ -44,7 +44,7 @@ $(document).ready(function() { $(document).on('click', '.conversation-settings-link', getConversationSettings); $(document).on('click', '#settings_module_ajax_submit', postConversationSettings); - var tf = new Function('n', 'return '+aStr['plural_func']+';'); + var tf = new Function('n', 's', 'var k = s.split("/")['+aStr['plural_func']+']; return (k ? k : s);'); jQuery.timeago.settings.strings = { prefixAgo : aStr['t01'], @@ -53,19 +53,20 @@ $(document).ready(function() { suffixFromNow : aStr['t04'], seconds : aStr['t05'], minute : aStr['t06'], - minutes : function(value){var str=aStr['t07'].split("/")[tf(value)]; return (str ? str : aStr['t07']);}, + minutes : function(value){return tf(value, aStr['t07']);}, hour : aStr['t08'], - hours : function(value){var str=aStr['t09'].split("/")[tf(value)]; return (str ? str : aStr['t09']);}, + hours : function(value){return tf(value, aStr['t09']);}, day : aStr['t10'], - days : function(value){var str=aStr['t11'].split("/")[tf(value)]; return (str ? str : aStr['t11']);}, + days : function(value){return tf(value, aStr['t11']);}, month : aStr['t12'], - months : function(value){var str=aStr['t13'].split("/")[tf(value)]; return (str ? str : aStr['t13']);}, + months : function(value){return tf(value, aStr['t13']);}, year : aStr['t14'], - years : function(value){var str=aStr['t15'].split("/")[tf(value)]; return (str ? str : aStr['t15']);}, + years : function(value){return tf(value, aStr['t15']);}, wordSeparator : aStr['t16'], numbers : aStr['t17'], }; + //mod_mail only $(".mail-conv-detail .autotime").timeago(); |