53

I am frequently active in the SOBotics chat room, and I see that sometimes we get the time when a message is posted:

Bot message on SOBotics

But sometimes we don't get the time of postings as shown in this image:

Normal user message posted

Though I know that we can get the time of posting by clicking the arrow that appears to the left of the message:

Time of posting message

But you can see that we don't get the exact time, we just get the hours ago when the message was posted.

My feature request is to add the timestamp on every message. This is what I mean to get (thanks to @Tschallacka for his great user script):

Enter image description here

In the meantime, we could use this script:

// ==UserScript==
// @name Timer
// @auther Tschallacka
// @namespace Violentmonkey Scripts
// @match https://chat.stackoverflow.com/rooms/111347/sobotics
// @grant none
// ==/UserScript==
window.setInterval(function() {
  $('.message').each(function(index, el) {
    var $el = $(el);
    if($el.find('.timestamp').length === 0) {
      var date = new Date($el.data('info').time*1000);
      $el.append('<div class="timestamp">'+date.getHours()+':'+date.getMinutes()+'</div>');
    }
  })
}, 500);
16
  • 10
    It's not actually the bot posting that causes the time stamp. Chat only posts the message post time once every... amount of time... I think it's after 15 minutes or so but I've never checked it. We actually do post time stamps on most messages in the mobile version of chat, so you could try that... I've not tried it on a desktop but... other than not being able to upload images, it's pretty okay.
    – Catija
    Jul 8, 2019 at 1:27
  • 17
    My userscript ChatImprovements now inserts additional message timestamps in live chat, and when loading older messages.
    – Samuel Liew Mod
    Jul 8, 2019 at 2:12
  • 8
    I agree it'd be nice to have the timestamps on every message. However, you can also hover over the 'posted 3h ago' to get the exact time (down to the minute) it was posted
    – Rob Mod
    Jul 8, 2019 at 2:14
  • 2
    I didn't notice that @Rob. Well, how can new users imagine that there's a title attribute to the message time and get to know the exact time of a message posted.
    – Gourav
    Jul 8, 2019 at 4:52
  • 1
    @Catija Today(8-Jul-2019), I noticed the time stamp is 10 min.
    – Gourav
    Jul 8, 2019 at 4:56
  • 9
    @Rob That's a lot of effort (over time) compared to having the time posted by each message. Ideally I shouldn't have to go click something and then hover for a second somewhere else just to see the time some message was posted when always-visible timestamps have been a staple of chat programs for decades. That method is also not exactly intuitive, as Lighteninger mentioned.
    – TylerH
    Jul 8, 2019 at 14:34
  • 5
    @TylerH I agree, hence the first part of my comment :). I was simply providing a workaround in the mean time
    – Rob Mod
    Jul 8, 2019 at 14:38
  • 1
    You could add a little user script in the meantime? window.setInterval(function() { $('.message').each(function(index, el) { var $el = $(el); if($el.find('.timestamp').length === 0) { var date = new Date($el.data('info').time*1000); $el.append('<div class="timestamp">'+date.getHours()+':'+date.getMinutes()+'</div>'); } }) }, 500); Jul 9, 2019 at 11:03
  • Does that really work? Because if this feature gets implemented then what the need of scripts? Also, thanks for the script @Tschallacka
    – Gourav
    Jul 9, 2019 at 11:04
  • @Lighteninger I just hacked it up in console, it works so far imgur.com/RM8pZBh Jul 9, 2019 at 11:05
  • That seems nice of you! And also to @SamuelLiew for his script.
    – Gourav
    Jul 9, 2019 at 11:07
  • @Lighteninger as far as I'm aware it's very common to have that (it can be seen all over SO, on comments and questions) as well as other forum posts and everywhere I can think of.
    – Tas
    Jul 9, 2019 at 22:34
  • @Tschallacka You might be interested in my self-answered question How do I get notified of events in SE chat? for a way to add a callback to be notified whenever a new message is added to chat (and other events). The notification includes the timestamp at which the message was created/edited. IMO, it's much better to only run when a message is added, rather than on an interval.
    – Makyen Mod
    Jul 10, 2019 at 18:24
  • 1
    @Gourav Why do you want the exact timestamp? What would it let you do (more easily)?
    – Meg Risdal
    Aug 1, 2019 at 6:00
  • 1
    Afraid this won't be something we will be pursuing, given the overall small impact here.
    – SpencerG StaffMod
    Feb 3 at 20:34

0

You must log in to answer this question.

Browse other questions tagged .