Reddit Uppers and Downers

By mistercow Last update Jun 2, 2009 — Installed 9,756 times.

Display created date

in
Subscribe to Display created date 1 post, 1 voice

zobier User
FirefoxWindows

s810 asked for the ability to see the exact timestamp rather than two significant digits and the order of magnitude of the age of a comment via /r/ideasfortheadmins, so I decided to add a few lines of code to Uppers and Downers to accommodate the request. Patch follows.


68c68
< var ups = 0, downs = 0, created = 0;
---
> var ups = 0, downs = 0;
71,72c71
< if(data.created) created = new Date((data.created - 7 * 60 * 60) * 1000);
< voteTable[name] = {downs:downs, ups:ups, created:created};
---
> voteTable[name] = {downs:downs, ups:ups};
107c106
< scoreSpan.parentNode.innerHTML += " (" + votes.ups + "|"+votes.downs+") " + votes.created.toString().replace(/\(.*/, '');
---
> scoreSpan.parentNode.innerHTML += " (" + votes.ups + "|"+votes.downs+")";

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel