Post by Wormopolis on Oct 15, 2010 23:59:06 GMT -8
Browser Tested: IE and FF
placement: Global footer
this code will make the IP addresses at the bottom of each post, and in someone's profile clickable and will take you to whatismyipaddress.com as a query.
code:
placement: Global footer
this code will make the IP addresses at the bottom of each post, and in someone's profile clickable and will take you to whatismyipaddress.com as a query.
code:
<script type="text/javascript">
<!--
// IP lookup v1.0
// by Wormopolis -www.wormocodes.com
// Do not repost - keep header intact
if (pb_action.match(/display|viewprofile|search2/)) {
for (tds=document.getElementsByTagName('td'), tt=0; tt<tds.length; tt++) {
if (tds[tt].previousSibling && tds[tt].previousSibling.width=='25%' && tds[tt].firstChild && tds[tt].firstChild.nodeName.match(/font/i) && tds[tt].firstChild.size && tds[tt].firstChild.size=='2' && tds[tt].firstChild.innerHTML.match(/(\d+\.\d+\.\d+\.\d+)/)) {
var res=RegExp.$1;
var nwlnk=document.createElement('a');
nwlnk.href="http://whatismyipaddress.com/ip/"+res;
nwlnk.target="_blank";
nwlnk.innerHTML=res;
tds[tt].firstChild.replaceChild(nwlnk, tds[tt].firstChild.firstChild);
}
if (tds[tt].width=='80%' && tds[tt].className.match(/windowbg/) && tds[tt].vAlign=='top') {
for (fnt=tds[tt].getElementsByTagName('font'), ff=0; ff<fnt.length; ff++) {
if (fnt[ff].size=='1' && fnt[ff].innerHTML.match(/ip\.(png|gif)/) && fnt[ff].innerHTML.match(/(\d+\.\d+\.\d+\.\d+)/)) {
var res=RegExp.$1;
var nwlnk=document.createElement('a');
nwlnk.href="http://whatismyipaddress.com/ip/"+res;
nwlnk.target="_blank";
nwlnk.innerHTML=res;
fnt[ff].replaceChild(nwlnk, fnt[ff].firstChild.nextSibling);
}
}
}
}
}
//-->
</script>