inherit
52328
0
Mar 13, 2009 16:15:58 GMT -8
CrAzY_J
871
July 2005
crazyj2
|
Post by CrAzY_J on Dec 10, 2005 12:18:05 GMT -8
Code description: What this code does is it hides the announcement thread in the board where the announcement was originally stickied. So there are no double threads in that board. Code creator: CrAzY_J
Global Footers <script type='text/javascript'> /* Hide announcement in source board created by CrAzY_J do not redistribute this code without the creator's permission*/
var Cell = document.body.getElementsByTagName('td'); if( pb_action == "boardindex" ) { for( t = 0 ; t < Cell.length ; t ++ ) { if( Cell[t].width == "48%" && Cell[t].className == "windowbg" && Cell[t].innerHTML.match(/Announcement:\s<b><a/i) ) { var Board = Cell[t].getElementsByTagName('a')[0].href.match(/board=(\w+)&/)? RegExp.$1:false; if( this.location.href.match(new RegExp('board='+Board+'$','i')) ) { Cell[t].parentNode.style.display = 'none'; } } } } </script>
Enjoy
Edited 9th Jan 07 By Ross: Fixed incompatibility with IE in regular expression match by making it case insensitive
Edited by Trublu: changed location.href.match to new pb_action variable
|
|