inherit
52328
0
Mar 13, 2009 16:15:58 GMT -8
CrAzY_J
871
July 2005
crazyj2
|
Post by CrAzY_J on Jan 4, 2006 20:38:29 GMT -8
Code description: It will add the last updated boardname + link to the info center. No editing required. Code creator: CrAzY_J Code placement: Main Footers
<script type='text/javascript'> /* Last Updated board in Info Center Created by CrAzY_J Do not redistribute this code without the creator's permission*/
var Cells = document.body.getElementsByTagName('td'); if( this.location.href.match(/\.com(\/(index\.cgi(#\w+|\?(action=home)?)?)?)?$/) ) { var Pattern = /^Total\sTopics:/; for( var c = Cells.length-1 ; c > 0 ; c -- ) { if( Cells[c].width == '60%' && Pattern.test( Cells[c].firstChild.firstChild.data ) && Cells[c].getElementsByTagName('a')[0] ) { var Board = Cells[c].getElementsByTagName('a')[0].href.split(/board=/)[1].split(/&/)[0]; Cells[c].id = 'starcraft_pwns'; } if( Cells[c].width == '66%' && Cells[c].getElementsByTagName('a')[0].href.match( new RegExp('board='+Board+'$','') ) ) { var BoardLink = Cells[c].getElementsByTagName('a')[0].href var BoardName = document.createTextNode( Cells[c].getElementsByTagName('a')[0].firstChild.firstChild.data ); break; } } var GetS = document.getElementById('starcraft_pwns').firstChild; var Link = document.createElement('a'); Link.href = BoardLink;
Link.appendChild( BoardName ); GetS.appendChild( document.createElement('br') ); GetS.appendChild( document.createTextNode('Last Updated Board: ') ); GetS.appendChild( Link ); } </script>
|
|