Created
March 7, 2012 13:12
-
-
Save spudtrooper/1993030 to your computer and use it in GitHub Desktop.
Momentarily shows twitter time stamps as full dates.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href='javascript:(function(){function a(){var c=document.getElementsByClassName("js-short-timestamp");if(!c){return}for(var b in c){var d=c[b];if(!!d.getAttribute&&!!d.getAttribute("data-time")){d.innerHTML=d.parentNode.title}}}a()})();'>Show twitter dates</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Momentarily shows twitter time stamps as full dates. | |
*/ | |
(function () { | |
function main() { | |
var spans = document.getElementsByClassName('js-short-timestamp'); | |
if (!spans) return; | |
for (var i in spans) { | |
var sp = spans[i]; | |
if (!!sp.getAttribute && !!sp.getAttribute('data-time')) { | |
// Get the nice date from the parent | |
sp.innerHTML = sp.parentNode.title; | |
} | |
} | |
} | |
main(); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment