|
Post by Wormopolis on Feb 11, 2010 0:36:23 GMT -8
ok.. I see whats going on now. normally the miniprofile would be filled with some sort of referee image. nothing else exists in the MP cell. so we can easily just check for it.
It looks like the anonymous code might have to run first... but lets see what happens... I will edit this code in the morning now that I have a better understanding.
|
|
|
Post by Wormopolis on Feb 13, 2010 7:54:44 GMT -8
find this line:
nwRw.onclick=function() {pb_bubble=1; this.nextSibling.nextSibling.style.display='none'; this.nextSibling.style.display='';}
change to:
if (tds[e].firstChild.nodeName.match(/a/i)) nwRw.onclick=function() {pb_bubble=1; this.nextSibling.nextSibling.style.display='none'; this.nextSibling.style.display='';}
|
|
|
Post by eveready on Feb 13, 2010 23:08:54 GMT -8
The bar is unclickable, but the username still shows up. *note- I have a post remodel that shows the username next to the Re: (thread title). This is the username that I mean.
|
|
|
Post by Wormopolis on Feb 14, 2010 5:48:44 GMT -8
OH! well that makes a difference... what is the name of the remodel, perhaps I can just edit it.
|
|
|
Post by eveready on Feb 14, 2010 7:17:22 GMT -8
|
|
|
Post by Wormopolis on Feb 14, 2010 23:51:40 GMT -8
yeah.. I cant edit it. There are too many codes working on the same thing. changing the one will cause the other to stop working, so I have to put something into my code to kinda check the outputs of both those codes.
try this version:
<script type="text/javascript"> <!-- // eveready post remodel - hockey style // by Wormopolis - concept by eveready
var jerseyColors=[ "http://img683.imageshack.us/img683/3092/jerseytemplate.png", "http://img683.imageshack.us/img683/3092/jerseytemplate2.png" ];
if (location.href.match(/thread=368/)) { for (tds=document.getElementsByTagName('td'), e=0; e<tds.length; e++) { if (tds[e].width=='20%' && tds[e].className.match(/windowbg/) && tds[e].vAlign=='top') { auth=rank=stars=ctitle=status= warn=warnbar=''; jerseyback=joined=loc= postcount=gender=karma=avt= contacts=ptext=''; stuffArray=tds[e].innerHTML.split(/<br>/i); if (tds[e].firstChild.nodeName.match(/a$/i)) tds[e].nextSibling.firstChild.rows[0].cells[1].insertBefore(tds[e].firstChild.cloneNode(true), tds[e].nextSibling.firstChild.rows[0].cells[1].firstChild); for (s=0; s<stuffArray.length; s++) { //retrieve MP parts if (stuffArray[s].match(/action=viewprofile/) && auth=='') { auth=stuffArray[s]; rank=stuffArray[s+1]; stars=stuffArray[s+2]; if (!stuffArray[s+3].match(/member is/)) { ctitle=stuffArray[s+3]; } } var status; if (stuffArray[s].match(/member is/i) && status=='') { status=stuffArray[s]; } var warn, warnbar; if (stuffArray[s].match(/Penalty:/) && warn=='') { warn=stuffArray[s].split(/<table/i)[0]; warnbar=stuffArray[s].split(/<table/i)[1]; warnbar='<table'+warnbar; } if (stuffArray[s].match(/warning level/i) && warn=='') { warn=stuffArray[s]; warnbar=stuffArray[s+1]; } var joined; if (stuffArray[s].match(/joined:/i) && joined=='') { joined=stuffArray[s]; } var loc; if (stuffArray[s].match(/location:/i) && loc=='') { loc=stuffArray[s]; } var postcount; if (stuffArray[s].match(/posts:/i) && postcount=='') { postcount=stuffArray[s]; } var gender; if (stuffArray[s].match(/gender:/i) && gender=='') { gender=stuffArray[s]; } var karma; if (stuffArray[s].match(/karma:/i) && karma=='') { karma=stuffArray[s]; } } avAreaStuff=tds[e].getElementsByTagName('center'); if (avAreaStuff[0]) { if (avAreaStuff[0].firstChild.nodeName.match(/img/i)) avt=avAreaStuff[0].firstChild; contacts=avAreaStuff[0].getElementsByTagName('a'); brks=avAreaStuff[0].getElementsByTagName('br'); for (br=0; br<brks.length; br++) { if (brks.nextSibling && brks.nextSibling.nodeName.match(/br/i)) { if (brks.nextSibling.nextSibling && brks.nextSibling.nextSibling.nodeName.match(/text/i)) { ptext=brks.nextSibling.nextSibling.nodeValue; break; } } } } // ok.. whew teampick=0; if (ptext && ptext.match(/\[Sj1:(\d+)\]/)) { teampick=RegExp.$1-1; ptext=ptext.replace(/\[Sj1:(\d+)\]/,''); } for (dv=tds[e].getElementsByTagName('div'), d=0; d<dv.length; d++) { if (dv[d].className=='miniprofile') jerseyback=dv[d].firstChild; } bgJersColors=jerseyColors[teampick]; postCell=tds[e].nextSibling; nwRw=postCell.firstChild.insertRow(1); nwRw.insertCell(0); nwRw.cells[0].colSpan=3; nwRw.cells[0].style.height='25'; if (tds[e].firstChild.nodeName.match(/a/i)) { nwRw.onclick=function() {pb_bubble=1; this.nextSibling.nextSibling.style.display='none'; this.nextSibling.style.display='';} } else { if (postCell.getElementsByTagName('font')[0].innerHTML.match(/by (.*?)<br>/)) { postCell.getElementsByTagName('font')[0].innerHTML = postCell.getElementsByTagName('font')[0].innerHTML.replace(/by (.*?)<br>/,'<br>'); } } nwTbl=nwRw.cells[0].appendChild(document.createElement('table')); nwTbl.width='100%'; nwRw=nwTbl.insertRow(0); nwRw.insertCell(0);nwRw.insertCell(0);nwRw.insertCell(0); nwRw.cells[0].width=nwRw.cells[1].width=nwRw.cells[2].width='33%' nwRw.cells[0].align='left'; nwRw.cells[0].innerHTML=rank+" "+stars; nwRw.cells[1].align='center'; nwRw.cells[1].innerHTML=warn+" "+warnbar; nwRw.cells[2].align='right'; nwRw.cells[2].innerHTML=status; tds[e].style.display="none"; postCell.colSpan=2; // hidden row nwRw=postCell.firstChild.insertRow(2); nwRw.style.display='none'; nwRw.onclick=function() {this.nextSibling.style.display=''; this.style.display='none'; pb_bubble=0;} nwRw.insertCell(0); nwRw.cells[0].colSpan=3; nwRw.cells[0].align='center'; nwTbl=nwRw.cells[0].appendChild(document.createElement('table')); nwTbl.width='674'; nwTbl.style.height='400'; nwTbl.style.backgroundImage='url('+bgJersColors+')'; nwTbl.cellSpacing="0"; nwRw=nwTbl.insertRow(0); nwRw.insertCell(0);nwRw.insertCell(0);nwRw.insertCell(0);nwRw.insertCell(0); nwRw.cells[0].align=nwRw.cells[1].align=nwRw.cells[2].align=nwRw.cells[3].align='center'; nwRw.cells[0].style.color=nwRw.cells[1].style.color=nwRw.cells[2].style.color=nwRw.cells[3].style.color='000000'; nwRw=nwTbl.insertRow(0); nwRw.insertCell(0);nwRw.insertCell(0);nwRw.insertCell(0);nwRw.insertCell(0); nwRw.cells[0].align=nwRw.cells[1].align=nwRw.cells[2].align=nwRw.cells[3].align='center'; nwRw.cells[0].style.color=nwRw.cells[1].style.color=nwRw.cells[2].style.color=nwRw.cells[3].style.color='000000'; nwRw=nwTbl.insertRow(0); nwRw.insertCell(0);nwRw.insertCell(0);nwRw.insertCell(0);nwRw.insertCell(0); nwRw.cells[0].align=nwRw.cells[1].align=nwRw.cells[2].align=nwRw.cells[3].align='center'; nwRw.cells[0].style.color=nwRw.cells[1].style.color=nwRw.cells[2].style.color=nwRw.cells[3].style.color='000000';
nwRw.cells[0].width='20%'; nwRw.cells[1].width='30%'; nwRw.cells[2].width='30%' nwTbl.rows[0].cells[0].style.height='75'; nwTbl.rows[1].cells[0].style.height='10'; nwTbl.rows[2].cells[0].style.height='120'; nwRw.cells[3].innerHTML=joined+"<br>"+postcount+"<br>"+karma+"<br>"+gender+"<br>"; nwTbl.rows[1].cells[2].innerHTML=auth; nwTbl.rows[1].cells[2].align='center'; nwTbl.rows[1].cells[2].vAlign='bottom'; if (jerseyback) nwTbl.rows[0].cells[1].appendChild(jerseyback); nwTbl.rows[0].cells[1].vAlign='bottom'; if (avt) nwTbl.rows[2].cells[1].appendChild(avt); if (ptext) { nwTbl.rows[2].cells[1].appendChild(document.createElement('br')); nwTbl.rows[2].cells[1].appendChild(document.createTextNode(ptext)); } jerseynum="00"; if (loc.match(/%(\d+)%/)) { jerseynum=RegExp.$1; loc=loc.replace(/%(\d+)%/, '') } jersStuff="<font style='font-size:56'>"+jerseynum+ "</font><br>"; nwTbl.rows[2].cells[2].innerHTML=jersStuff+loc.replace(/location:/i,''); nwTbl.rows[2].cells[2].align='center'; nwTbl.rows[2].cells[2].vAlign='top'; if (contacts.length>0) { for (c=0;c<contacts.length; c++) {nwTbl.rows[2].cells[3].appendChild(contacts[c]); nwTbl.rows[2].cells[3].appendChild(document.createElement('br')); } } } } }
|
|
|
Post by eveready on Feb 15, 2010 18:13:04 GMT -8
It seems to be reacting the same way.
|
|
|
Post by Wormopolis on Feb 15, 2010 20:17:33 GMT -8
recopy
|
|
|
Post by eveready on Feb 16, 2010 0:53:01 GMT -8
Same.
|
|
|
Post by Wormopolis on Feb 16, 2010 3:15:25 GMT -8
DAMN that code!
|
|
|
Post by Wormopolis on Feb 16, 2010 3:38:39 GMT -8
change
if (tds[e].firstChild.nodeName.match(/a/i)) { nwRw.onclick=function() {pb_bubble=1; this.nextSibling.nextSibling.style.display='none'; this.nextSibling.style.display='';} } else { if (postCell.getElementsByTagName('font')[0].innerHTML.match(/by (.*?)<br>/)) { postCell.getElementsByTagName('font')[0].innerHTML = postCell.getElementsByTagName('font')[0].innerHTML.replace(/by (.*?)<br>/,'<br>'); } }
to
if (tds[e].firstChild.nodeName.match(/a/i)) { nwRw.onclick=function() {pb_bubble=1; this.nextSibling.nextSibling.style.display='none'; this.nextSibling.style.display='';} } else { if (postCell.getElementsByTagName('font')[0].innerHTML.match(/by <b>(.*?)<\/b>/i)) { postCell.getElementsByTagName('font')[0].innerHTML = postCell.getElementsByTagName('font')[0].innerHTML.replace(/by <b>(.*?)<\/b>/i,''); } }
|
|
|
Post by eveready on Feb 16, 2010 4:19:24 GMT -8
Code stopped working.
|
|
|
Post by Wormopolis on Feb 16, 2010 6:11:09 GMT -8
caramel covered apples!
recopy that edit again. I forgot to escape the slashes.
|
|
|
Post by eveready on Feb 16, 2010 6:14:50 GMT -8
No tv and no beer make Wormo go something something
|
|
|
Post by eveready on Feb 16, 2010 6:18:22 GMT -8
Well it's back working again. Stupid username is still there.
|
|