aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--view/js/main.js51
1 files changed, 24 insertions, 27 deletions
diff --git a/view/js/main.js b/view/js/main.js
index 70a83de33..aff6eab4d 100644
--- a/view/js/main.js
+++ b/view/js/main.js
@@ -56,6 +56,30 @@ if ('serviceWorker' in navigator) {
$.ajaxSetup({cache: false});
+var tf = new Function('n', 's', 'var k = s.split("/")['+aStr['plural_func']+']; return (k ? k : s);');
+
+jQuery.timeago.settings.strings = {
+ prefixAgo : aStr['t01'],
+ prefixFromNow : aStr['t02'],
+ suffixAgo : aStr['t03'],
+ suffixFromNow : aStr['t04'],
+ seconds : aStr['t05'],
+ minute : aStr['t06'],
+ minutes : function(value){return tf(value, aStr['t07']);},
+ hour : aStr['t08'],
+ hours : function(value){return tf(value, aStr['t09']);},
+ day : aStr['t10'],
+ days : function(value){return tf(value, aStr['t11']);},
+ month : aStr['t12'],
+ months : function(value){return tf(value, aStr['t13']);},
+ year : aStr['t14'],
+ years : function(value){return tf(value, aStr['t15']);},
+ wordSeparator : aStr['t16'],
+ numbers : aStr['t17'],
+};
+
+jQuery.timeago.settings.allowFuture = true;
+
$(document).ready(function() {
$(document).on('click focus', '.comment-edit-form', handle_comment_form);
@@ -139,30 +163,6 @@ $(document).ready(function() {
});
// @hilmar <-|
- var tf = new Function('n', 's', 'var k = s.split("/")['+aStr['plural_func']+']; return (k ? k : s);');
-
- jQuery.timeago.settings.strings = {
- prefixAgo : aStr['t01'],
- prefixFromNow : aStr['t02'],
- suffixAgo : aStr['t03'],
- suffixFromNow : aStr['t04'],
- seconds : aStr['t05'],
- minute : aStr['t06'],
- minutes : function(value){return tf(value, aStr['t07']);},
- hour : aStr['t08'],
- hours : function(value){return tf(value, aStr['t09']);},
- day : aStr['t10'],
- days : function(value){return tf(value, aStr['t11']);},
- month : aStr['t12'],
- months : function(value){return tf(value, aStr['t13']);},
- year : aStr['t14'],
- years : function(value){return tf(value, aStr['t15']);},
- wordSeparator : aStr['t16'],
- numbers : aStr['t17'],
- };
-
- jQuery.timeago.settings.allowFuture = true;
-
$(document).on('click', '.notification, .message', function(e) {
let b64mid = this.dataset.b64mid;
let notify_id = this.dataset.notify_id;
@@ -221,9 +221,6 @@ $(document).ready(function() {
};
- //mod_mail only
- $(".mail-conv-detail .autotime").timeago();
-
savedTitle = document.title;
updateInit();