aboutsummaryrefslogtreecommitdiffstats
path: root/view/js
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-10-11 10:03:05 +0000
committerMario <mario@mariovavti.com>2022-10-11 10:03:05 +0000
commitf9a4c53e3feb07e5319b110b25b4746ae839c420 (patch)
treefbbde69114acba764cf6b735433c53e099fd19c5 /view/js
parent60b576568e69eabfe40761645c9e8e0de636b608 (diff)
downloadvolse-hubzilla-f9a4c53e3feb07e5319b110b25b4746ae839c420.tar.gz
volse-hubzilla-f9a4c53e3feb07e5319b110b25b4746ae839c420.tar.bz2
volse-hubzilla-f9a4c53e3feb07e5319b110b25b4746ae839c420.zip
jQuery.timeago.settings.strings should not be in document.ready
Diffstat (limited to 'view/js')
-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();