]> cat aescling's git repositories - mastodon.git/commitdiff
Apply user timezone for the title attribute of .time-ago (#4693)
authorunarist <m.unarist@gmail.com>
Fri, 25 Aug 2017 15:21:16 +0000 (00:21 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Fri, 25 Aug 2017 15:21:16 +0000 (17:21 +0200)
app/javascript/packs/public.js

index da1f550fc221ecc372e26e4a5e2974aedd2177cc..d8a0f4eeeb1528cf523813735db137f4171890af 100644 (file)
@@ -35,6 +35,7 @@ function main() {
 
     [].forEach.call(document.querySelectorAll('time.time-ago'), (content) => {
       const datetime = new Date(content.getAttribute('datetime'));
+      content.title = dateTimeFormat.format(datetime);
       content.textContent = relativeFormat.format(datetime);
     });
   });