|
Script Summary:
Adds the date a submission was posted under that submission's title. (NOTE: As of July 15, 2009, this script is no longer being maintained - please read the script's page for more information.) |
This script has no discussions. |
This script has no reviews. |
Notice
As of July 15, 2009, I am no longer maintaining this script. Since it almost always has to be run manually, its usefulness is greatly reduced. If you want to take over development of this script, especially if you can implement the ability for it to run automatically on each page, feel free to do so. If you can successfully implement this, please let me know about it, so that I can make one final update to this script: to let others know they should uninstall mine and use yours in its place =)
Usage Notes
This script may only automatically run when directly visiting a page - it will not work on any pages loaded from the "page" links at the bottom, unless the page is reloaded. Unfortunately, due to how scripts are loaded on the site, it is likely to not automatically run at all, requiring it to be manually run instead.
To test it out, execute this script in anything that will run it (such as Firebug or a Javascript shell bookmarklet), or create a bookmarklet from the line below (this script, minus the comments to conserve space) and run it:
Script Code
javascript:(function(){var%20thumbnailPreviews%20=%20""; thumbnailPreviews%20=%20document.getElementById("gmi-GPage"); for%20(var%20currentItem%20=%200; %20currentItem%20<%20thumbnailPreviews.getElementsByTagName("div").length; %20currentItem%20=%20currentItem%20+%201)%20{if%20(thumbnailPreviews.getElementsByTagName("div")[currentItem].getAttribute("class")%20===%20"tt-a")%20{var%20currentItemNode%20=%20thumbnailPreviews.getElementsByTagName("div")[currentItem]; var%20itemFullDate%20=%20""; var%20itemDate%20=%20currentItemNode.firstChild.childNodes[3].getAttribute("title"); var%20itemDateLocation%20=%20itemDate.match("[A-z]{3}%20[0-9]{1,2},%20[0-9]{4}"); itemDateLocation%20=%20String(itemDateLocation); itemDateLocation%20=%20itemDateLocation.replace(",",%20""); var%20itemDay%20=%20itemDateLocation.split("%20")[1]; var%20itemMonth%20=%20itemDateLocation.split("%20")[0]; var%20itemYear%20=%20itemDateLocation.split("%20")[2]; if%20(itemDay%20<%2010)%20{itemDay%20=%20"0"%20+%20itemDay; }if%20(itemMonth%20===%20"Jan")%20{itemMonth%20=%20"01"; }else%20if%20(itemMonth%20===%20"Feb")%20{itemMonth%20=%20"02"; }else%20if%20(itemMonth%20===%20"Mar")%20{itemMonth%20=%20"03"; }else%20if%20(itemMonth%20===%20"Apr")%20{itemMonth%20=%20"04"; }else%20if%20(itemMonth%20===%20"May")%20{itemMonth%20=%20"05"; }else%20if%20(itemMonth%20===%20"Jun")%20{itemMonth%20=%20"06"; }else%20if%20(itemMonth%20===%20"Jul")%20{itemMonth%20=%20"07"; }else%20if%20(itemMonth%20===%20"Aug")%20{itemMonth%20=%20"08"; }else%20if%20(itemMonth%20===%20"Sep")%20{itemMonth%20=%20"09"; }else%20if%20(itemMonth%20===%20"Oct")%20{itemMonth%20=%20"10"; }else%20if%20(itemMonth%20===%20"Nov")%20{itemMonth%20=%20"11"; }else%20if%20(itemMonth%20===%20"Dec")%20{itemMonth%20=%20"12"; }itemFullDate%20=%20itemMonth%20+%20"/"%20+%20itemDay%20+%20"/"%20+%20itemYear; var%20itemDateSpan%20=%20document.createElement("span"); var%20itemLineBreak%20=%20document.createElement("br"); var%20itemDateSpanText%20=%20document.createTextNode(itemFullDate); itemDateSpan.setAttribute("id",%20"item_date"); itemDateSpan.setAttribute("style",%20"display:%20block; %20font-size:%20smaller; "); itemDateSpan.appendChild(itemDateSpanText); var%20currentItemTitle%20=%20currentItemNode.firstChild.childNodes[3]; currentItemNode.appendChild(itemDateSpan); currentItemNode.firstChild.insertBefore(itemDateSpan,%20currentItemTitle.nextSibling); currentItemNode.firstChild.insertBefore(itemLineBreak,%20itemDateSpan); }}})();
Updates
July 15, 2009
- Added a notice stating that I am no longer maintaining this script.
- Added a few headings to this script's page for easier navigation.
January 24, 2009
- Revised the code that extracts the submission date - it will no longer break as a result of the layout change.
November 15, 2008
- Added a condition to skip over the first item, if it's an advertisement - it will no longer break if there is an advertisement on the page (thank you, teukkam!).
November 13, 2008
- Rewrote the code that extracts the submission date - it will no longer break if the submission is a film.





