iAlex
Junior Member
Posts: 73
|
Post by iAlex on Jan 2, 2008 5:07:04 GMT -5
This code will reverse the display of all posts. Which means the latest reply will be placed at the top, rather than the bottom.
Global Footer.
Cross Browser.
Open Source.
<script type="text/javascript"> <!--
/*Reverse Post Display - By iAlex - Open Source*/
if(location.href.match(/action=display/)){ var iTd=document.getElementsByTagName('td'); var i=iTd.length; while(--i){ if(iTd.item(i).width=="20%" && iTd.item(i).className.match(/windowbg(2)?/) && iTd.item(i).vAlign=="top" && iTd.item(i).firstChild && !iTd.item(i).firstChild.nodeName.match(/input/i)){ var iParent=iTd.item(i).parentNode.parentNode; var iNum=(iParent.rows.item(iParent.rows.length-1).firstChild.vAlign=="middle")? 2 : 1; iParent.insertBefore(iTd.item(i).parentNode, iParent.rows.item(iParent.rows.length-iNum)); } } }
//--> </script>
|
|
Blink
Addicted Member
Posts: 1,699
|
Post by Blink on Jan 3, 2008 13:33:35 GMT -5
Holy Smokes there are a lot of your submissions in this board!
All great codes, and I really like this one for some reason. Wondering how you come up with all these ideas.
Kahless should be around shortly to move this, I'm guessing you'll get a bucket load of points too.
|
|