</noinclude>
uptodate=<fontspan colorstyle='"color: blue';">new</fontspan> Date(<fontspan colorstyle='"color: brown';">"Aug 26 2005"</fontspan>); <fontspan colorstyle='"color: green';">//This is the date which things need to be after to show up.
</fontspan>tokeep=<fontspan colorstyle='"color: blue';">new</fontspan> Array(); <fontspan colorstyle='"color: green';">//The array that stores the info about which pieces to keep.
</fontspan>bc=document.getElementById(<fontspan colorstyle='"color: brown';">"bodyContent"</fontspan>); <fontspan colorstyle='"color: green';">//Shorthand
</fontspan>z=bc.childNodes; <fontspan colorstyle='"color: green';">//Shorthand
</fontspan><fontspan colorstyle='"color: blue';">for</fontspan> (x=0;x<z.length;x++) { <fontspan colorstyle='"color: green';">//Go through each childNode of bodyContent
</fontspan> tokeep[x]=z[x]; <fontspan colorstyle='"color: green';">//Put the node into tokeep (if kept, this will be later be replaced by true.)
</fontspan> <fontspan colorstyle='"color: blue';">if</fontspan> (z[x].textContent) { <fontspan colorstyle='"color: green';">//Some things don't have textContent
</fontspan> <fontspan colorstyle='"color: green';">//This matches the signature date format. (Odd other formats are not yet handled.)
</fontspan> q=z[x].textContent.match(/[0-9]+:[0-9]+, [0-9]+ [A-Z][a-z]+ [0-9]+ [(]UTC[)]/);
<fontspan colorstyle='"color: blue';">if</fontspan> (q) { <fontspan colorstyle='"color: green';">//Some things don't have any dates in them
</fontspan> <fontspan colorstyle='"color: green';">//This turns it into a Date object(it needs to be reformatted for the sake of the parser)
</fontspan> q=<fontspan colorstyle='"color: blue';">new</fontspan> Date(String(q).replace(/(.+), (.+) [(]UTC[)]/, <fontspan colorstyle='"color: brown';">"$2 $1 GMT"</fontspan>));
<fontspan colorstyle='"color: blue';">if</fontspan> (q>uptodate) { <fontspan colorstyle='"color: green';">//Is it after uptodate?
</fontspan> tokeep[x]=<fontspan colorstyle='"color: blue';">true</fontspan> <fontspan colorstyle='"color: green';">//Then keep it.
</fontspan> }}}};
<fontspan colorstyle='"color: blue';">for</fontspan> (x=0;x<tokeep.length;x++) { <fontspan colorstyle='"color: green';">//Go through tokeep and do the removals.
</fontspan> <fontspan colorstyle='"color: blue';">if</fontspan> (tokeep[x]!=<fontspan colorstyle='"color: blue';">true</fontspan>) {
bc.removeChild(tokeep[x])
}}
|