|
Post by Wormopolis on Mar 10, 2012 4:31:27 GMT -8
Browsers Tested: IE, FF and Chrome placement: global footer
When viewing attachments, the only way back to the thread is using the back button. this little code will place a text link in the bottom right corner to take you back to the thread.
<script type="text/javascript"> <!-- // return to thread link on attachment pages // by Wormopolis - www.wormocodes.com // idea by Seppy // keep header intact
if (pb_action=='downloadattachmentpage') { for (tds=document.getElementsByTagName('td'), tt=0; tt<tds.length; tt++ ) { if (tds[tt].className=='titlebg' && tds[tt].innerHTML.match(/(enlarged image|downloading file)/i)) { var targetCell= tds[tt].parentNode.nextSibling.firstChild; targetCell.appendChild(document.createElement('br')); var nwlnk=document.createElement('a'); var nwdv=document.createElement('div'); nwdv.align="right"; nwlnk.href=location.href.replace(/downloadattachmentpage/,'display'); nwlnk.innerHTML="<font size='3'>Return To Thread</font>"; nwlnk.align="right"; nwdv.appendChild(nwlnk); targetCell.appendChild(nwdv); break; } } } // --> </script>
|
|