That should work I think, you can also try putting your scripts in the ACP at /admin/appearance/customise#custom-js
where is the module outputing the things such as"ahout 6 hours ago"
frissdiegurke Plugin & Theme Dev
As I can see within the lavender-themes js-file it's a plugin of jQuery: create a span with title like
utils.toISOString(post.lastposttime)), select it with jQuery and call
Within templates I guess you just need to give the span the correct title and class
PS: not tested anything
Yep. We use timeago, except for the notifications dropdown, which is still our own hand-rolled string, which really ought to be replaced at some point.
Just call $(parentElement).timeago() to initialise. The ISO string should be in the title, as @frissdiegurke says.
which is still our own hand-rolled string
I actually didn't realize this. I happened to hand-roll my own fn for pewter (see this)
maybe make it publically available so I can just call that instead. whichever of our two functions that's better
@psychobunny Notifications are still using the old utils.js relativeTime method
How can I trigger "page ready" via jQuery?Moved Unsolved NodeBB Development