logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe
commit: fb8aa2b3bac122f819b07c7f9461b26cc369c621
parent: 00f9f16f94feeaf2fae9a5a1a7bcb3a06b86a036
Author: unarist <m.unarist@gmail.com>
Date:   Sat, 26 Aug 2017 00:21:16 +0900

Apply user timezone for the title attribute of .time-ago (#4693)


Diffstat:

Mapp/javascript/packs/public.js1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/app/javascript/packs/public.js b/app/javascript/packs/public.js @@ -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); }); });