Peter
Junior Member
Coding God
Posts: 50
|
Post by Peter on Apr 29, 2006 13:17:07 GMT
<script type="text/javascript"> <!--
// On image var onImg = "on.gif";
var re = /board=(\w+)/i var iCell = document.getElementsByTagName("td");
for(c = 0; c < iCell.length; c ++){ if(iCell.item(c).className == "windowbg" && iCell.item(c).width == "8%"){ if(iCell.item(c).firstChild.src.match(new RegExp("\/" + onImg, "i"))){ iCell.item(c).onclick = function(){ bID = this.parentNode.cells.item(1).firstChild.firstChild.href.match(re)[1]; location.href = "index.cgi?board=" + bID + "&action=markasread"; } iCell.item(c).onmouseover = function(){ this.style.cursor = "pointer"; this.title = "Mark this board as read"; } iCell.item(c).onmouseout = function(){ this.style.cursor = ""; } } } }
//--> </script>
Add to main footer.
If your on image is custom, change it in the top of the script. When people click on the on image, all threads will be marked as read for that board.
|
|