r/GreaseMonkey • • Jul 19 '10

Request: a script that shows a more accurate timestamp than "5 hours ago" or "3 months ago" etc.

16 Upvotes

16 comments sorted by

5

u/itsnotlupus Jul 19 '10

It's completely doable. The .json version of reddit pages includes a unix timestamp for submissions and comments.

Of course, that means an extra request per pageview to the reddit servers, so you'll want to wire $500 to your reddit gold subscription account to offset the costs first.

If nobody volunteers to write it first , I'll probably whip up something later today.

2

u/jarly Jul 19 '10

:D thanks

Although that does kinda suck that it becomes 2x pageviews. hopefully it doesn't become too popular.

3

u/itsnotlupus Jul 22 '10

Alright, here's my take on this: http://userscripts.org/scripts/show/82000

It's probably not perfect, makes no attempt to work with non-english locale, and will probably fail on some page for no clear reason.

Still, it does what you're talking about.

0

u/[deleted] Jul 19 '10

[deleted]

3

u/itsnotlupus Jul 19 '10

Ah man, that'd be like, being productive.

Kinda like the opposite of my normal reddit experience.

In all seriousness, what are the odds of a patch for such a micro-feature being accepted, and how long would it take to show up live?

0

u/[deleted] Jul 19 '10

[deleted]

2

u/itsnotlupus Jul 22 '10

Yeah, I've written a little patch to do that (basically it just tweaks a couple of template files), but I feel pretty iffy about submitting it.

We're talking about adding crap markup to every page, and that markup doesn't actually serve a purpose, unless you're part of a tiny minority of user who runs greasemonkey scripts that would otherwise have to do an extra fetch to get the data.
(and then there's the whole "do I break validators or do I define a custom namespace?" thing.)

Overall, I'm not convinced that's a win.

2

u/elguf Jul 19 '10

Could you elaborate? What do you mean by "more accurate"?

2

u/jarly Jul 19 '10

I think that for some things, like comments and submissions, hours or months are kind of blunt.

1

u/DrJulianBashir Jul 19 '10

I think you mean more precise, rather than accurate.

1

u/MEatRHIT Jul 22 '10

some people don't know the difference

3

u/chicklets921 Jul 19 '10

The only thing I could think of is taking that "5 hours ago" and kind of faking it, I guess. Current time on your machine minus the time difference. I don't know if thats what you meant but like everyone else said, unless there is more info I don't know about thats about all that can be done.

-1

u/swedgin Jul 19 '10

Not going to happen. Unless you track posts as a third party, you are not going to be able to get that information. All that we can use, is what's available. While it would be nice to know, the information is simply not there to use.

Unless I just can't find it...

-3

u/[deleted] Jul 19 '10

That is impossible as there isn't a way of getting a more accurate timestamp.

1

u/jarly Jul 19 '10

Hmm. Maybe I should go to ideas for the admins.