|
Post by Schubaltz on Jul 4, 2007 22:24:20 GMT -5
Description: Colors threads based on their state (locked, stickied, normal, sticky-locked, etc)
Source: Open
Cross-browser: Yes
Global Footer <script type="text/javascript"> <!-- // Color Thread Titles Based on State
var col = [ ["/locked.gif", "/sticky.gif"], ["#00FF00", "#0000FF"] ] if(location.href.match(/board=[^&]+(&page=\d+)?$/)) for(var l = document.links, r = 4; r < l.length; r ++) if(l[r].className == "nav") { var i = l[r].parentNode.getElementsByTagName("table"); i = i[i[1].rows[0].cells.length == 1 ? 1 : 3].rows; for(var x = 2; x < i.length - 1; x ++) { if(i[x].cells.length == 1) continue; var r = i[x].cells[0].firstChild.firstChild.src; if(new RegExp("(" + col[0].join("|") + ")$").test(r)) i[x].cells[2].getElementsByTagName("a")[0].style.color = col[1][col[0].join(",").split(RegExp.$1)[0].split(",").length - 1] } break; } //--> </script>
|
|