Post by Sam on Nov 12, 2012 14:08:43 GMT -8
Hi guys,
Anyone able to make this following code compatible with Proboards V5 at all please? It is a bar that seperates two seperate posts and has an arrow that when clicked, returns to the top of the page.
<script type="text/javascript">
<!--
var iArrowImage="http://i294./mm102/sytforum/iarrowitupforitpleaseqm7.gif"; //Arrow Image
if(location.href.match(/action=(display|(user)?recent|calendarview|search2|pmview)/) || location.href.match(/index.cgi$/) && document.title.match(/Preview/) && document.postForm){
var iTd=document.getElementsByTagName('td');
for(i=0;i<iTd.length;i++){
if(iTd.item(i).width=="20%" && iTd.item(i).className.match(/windowbg(2)?/) && iTd.item(i).align=="left" && iTd.item(i).vAlign=="top" && iTd.item(i).firstChild && !iTd.item(i).firstChild.nodeName.match(/input/i)){
var iContact='';
if(iTd.item(i).innerHTML.match(/member is/)){
var iCentre=iTd.item(i).getElementsByTagName('center');
var iContact = iCentre.item(iCentre.length-1).innerHTML.replace(/^((.+?))?<br\s?\/?><br\s?\/?>((.+?)<br\s?\/?><br\s?\/?>)?/i, '');
var iIcon=iCentre.item(iCentre.length-1).getElementsByTagName('a');
for(a=0;a<iIcon.length;a++){
iIcon.item(a).style.display='none';
}
}
var iLineTr=document.createElement('tr');
var iLeftTd=document.createElement('td');
iLeftTd.className='catbg';
var iRightTd=document.createElement('td');
iRightTd.className='catbg';
iRightTd.innerHTML='<div style="float: left;">'+iContact.replace(/<br\s?\/?>/ig, '')+'</div><div style="float: right;"><a href="javascript: scroll(0, 0)"><img src="'+iArrowImage+'" border="0" /></a></div>';
iLineTr.appendChild(iLeftTd);
iLineTr.appendChild(iRightTd);
iTd.item(i).parentNode.parentNode.insertBefore(iLineTr, iTd.item(i).parentNode.nextSibling);
}
}
}
//-->
</script>
Many thanks for any help provided.
Thanks,
Sam
Anyone able to make this following code compatible with Proboards V5 at all please? It is a bar that seperates two seperate posts and has an arrow that when clicked, returns to the top of the page.
<script type="text/javascript">
<!--
var iArrowImage="http://i294./mm102/sytforum/iarrowitupforitpleaseqm7.gif"; //Arrow Image
if(location.href.match(/action=(display|(user)?recent|calendarview|search2|pmview)/) || location.href.match(/index.cgi$/) && document.title.match(/Preview/) && document.postForm){
var iTd=document.getElementsByTagName('td');
for(i=0;i<iTd.length;i++){
if(iTd.item(i).width=="20%" && iTd.item(i).className.match(/windowbg(2)?/) && iTd.item(i).align=="left" && iTd.item(i).vAlign=="top" && iTd.item(i).firstChild && !iTd.item(i).firstChild.nodeName.match(/input/i)){
var iContact='';
if(iTd.item(i).innerHTML.match(/member is/)){
var iCentre=iTd.item(i).getElementsByTagName('center');
var iContact = iCentre.item(iCentre.length-1).innerHTML.replace(/^((.+?))?<br\s?\/?><br\s?\/?>((.+?)<br\s?\/?><br\s?\/?>)?/i, '');
var iIcon=iCentre.item(iCentre.length-1).getElementsByTagName('a');
for(a=0;a<iIcon.length;a++){
iIcon.item(a).style.display='none';
}
}
var iLineTr=document.createElement('tr');
var iLeftTd=document.createElement('td');
iLeftTd.className='catbg';
var iRightTd=document.createElement('td');
iRightTd.className='catbg';
iRightTd.innerHTML='<div style="float: left;">'+iContact.replace(/<br\s?\/?>/ig, '')+'</div><div style="float: right;"><a href="javascript: scroll(0, 0)"><img src="'+iArrowImage+'" border="0" /></a></div>';
iLineTr.appendChild(iLeftTd);
iLineTr.appendChild(iRightTd);
iTd.item(i).parentNode.parentNode.insertBefore(iLineTr, iTd.item(i).parentNode.nextSibling);
}
}
}
//-->
</script>
Many thanks for any help provided.
Thanks,
Sam