|
Post by Ron White on Mar 31, 2006 0:54:56 GMT -5
Goes in the Global Footer
This code will allow you to zoom in on an image in a post by clicking on it. You can set the max size images can zoom. Edit where specified.
<script> //Click to Zoom Images in Posts v1.0 //Copyright 12-31-2005 ~Wonder //May be reposted anywhere as long as this header remains in tact
//Edit max width and height a zoomed image can be maxWidth=800; maxHeight=800;
if(location.href.match(/action=(display|goto|viewprofile|pmview|recent|calendarview)/)) { c=0; td = document.getElementsByTagName("td"); server=location.href.split(".com")[0]; for(i = 0; i < td.length; i ++) { if(td[i].innerHTML.match(/(« Reply #\d)|(« Thread Started on )/) && td[i].getElementsByTagName("img").length==0) { temp=td[i].parentNode.nextSibling.getElementsByTagName("img"); for(j=0;j<temp.length;j++) { temp[j].width=temp[j].width; temp[j].height=temp[j].height; temp[j].id=c+"x"+temp[j].width+"x"+temp[j].height; temp[j].onclick=zoomImage; c++; } } } } function zoomImage() { this.width=this.width; this.height=this.height; if(this.width*2>maxWidth || this.height*2>maxHeight) { temp=this.id.split("x"); this.width=parseInt(temp[1],10); this.height=parseInt(temp[2],10); } else { this.width=this.width*2; this.height=this.height*2; } } </script>
-+-Win32##Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 (VAUSSU03)##1280 × 768##1-+-
|
|