inherit
Handsome Devil
20992
0
Oct 26, 2012 20:34:21 GMT -8
ⓦ৹₪deⓡ
No animals were harmed in the feeding of this human.
925
March 2004
chickenturkeybacon
|
Post by ⓦ৹₪deⓡ on Dec 31, 2005 4:25:50 GMT -8
This code allows users to zoom in on an image in a post just by clicking on it. You can set the max size images can zoom. Do NOT PM me for support or requests, that's what the coding boards are for. Edit where indicated. Enjoy. ~Wonder
Global Footer<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>
|
|