Original size visitors avatar pictures

Don Von Alpha Dom
by Don Von Alpha Dom · 2 posts
11 years ago in Visitors Panel
Posted 11 years ago · Author
Make sure you put this code at the very end of your imvu page (the panel that is best for this is the very lower right panel!). This code resizes avatar pics back to their original size instead of those small dinky pics that are normally in the visitors panel.

Code
<style type="text/css">
.avPic { width:auto!important; height:auto!important; }
</style>
<script type="text/javascript">
   function getNaturalWidth(dImg) {
      var naturalWidth  = -1;
      if(dImg.naturalWidth != null) {
         naturalWidth = dImg.naturalWidth;
      } else if(dImg.runtimeStyle) {
         dImg.runtimeStyle.width= 'auto';
         dImg.runtimeStyle.height= 'auto';
         dImg.runtimeStyle.borderWidth= '0';
         dImg.runtimeStyle.padding= '0';
         naturalWidth =  dImg.offsetWidth;
         dImg.runtimeStyle.width= '';
         dImg.runtimeStyle.height= '';
         dImg.runtimeStyle.borderWidth= '';
         dImg.runtimeStyle.padding= '';
      } else {
         var dImgBk = dImg.cloneNode(true);
         dImg.className = '';
         dImg.style.width = 'auto !important';
         dImg.style.height = 'auto !important';
         dImg.style.borderWidth= '0 !important';
         dImg.style.padding= '0 !important';
         dImg.removeAttribute('width');
         dImg.removeAttribute('height');
         naturalWidth =  dImg.width;
         dImg.setAttribute('width' , dImgBk.getAttribute('width') );
         dImg.setAttribute('height', dImgBk.getAttribute('height') );
         dImg.style.width = dImgBk.style.width ;
         dImg.style.height = dImgBk.style.height ;
         dImg.style.padding = dImgBk.style.padding ;
         dImg.style.borderWidth=  dImgBk.style.borderWidth ;
         dImg.style.className = dImgBk.style.className ;
      }
      return(naturalWidth);
   }
   function getNaturalHeight(dImg) {
      var naturalHeight  = -1;
      if(dImg.naturalHeight != null) {
         naturalHeight = dImg.naturalHeight;
      } else if(dImg.runtimeStyle) {
         dImg.runtimeStyle.width= 'auto';
         dImg.runtimeStyle.height= 'auto';
         dImg.runtimeStyle.borderWidth= '0';
         dImg.runtimeStyle.padding= '0';
         naturalHeight = dImg.offsetHeight;
         dImg.runtimeStyle.width= '';
         dImg.runtimeStyle.height= '';
         dImg.runtimeStyle.borderWidth= '';
         dImg.runtimeStyle.padding= '';
      } else {
         var dImgBk = dImg.cloneNode(true);
         dImg.className = '';
         dImg.style.width = 'auto !important';
         dImg.style.height = 'auto !important';
         dImg.style.borderWidth= '0 !important';
         dImg.style.padding= '0 !important';
         dImg.removeAttribute('width');
         dImg.removeAttribute('height');
         naturalHeight =  dImg.height;
         dImg.setAttribute('width' , dImgBk.getAttribute('width') );
         dImg.setAttribute('height', dImgBk.getAttribute('height') );
         dImg.style.width = dImgBk.style.width ;
         dImg.style.height = dImgBk.style.height ;
         dImg.style.padding = dImgBk.style.padding ;
         dImg.style.borderWidth=  dImgBk.style.borderWidth ;
         dImg.style.className = dImgBk.style.className ;
      }
      return(naturalHeight);
   }   
   function ResizeIt_imvucodes_net() {
      var imgGroup = document.getElementById('visitors_panel_body').getElementsByTagName('img');
      for (var i=0; i<imgGroup.length; i++) {
         imgGroup[i].style.width=getNaturalWidth(imgGroup[i])+'px';
         imgGroup[i].style.height=getNaturalHeight(imgGroup[i])+'px';
      }
   }
   document.onload=ResizeIt_imvucodes_net();
</script>
Posted 3 years ago
dope thanks dom

Create an account or sign in to comment

You need to be a member in order to leave a comment

Sign in

Already have an account? Sign in here

SIGN IN NOW

Create an account

Sign up for a new account in our community. It's easy!

REGISTER A NEW ACCOUNT
Select a forum Protection     Help & Support     Introductions     Mafia News     IMVU News General Discussion     IMVU Lounge        IMVU Series / Roleplaying        Social Games     Mafia Market     Mafia Tools        Premium IMVU Tools        Off Topic Tools     Off Topic     Contests Creator Corner     Graphics Design        Photoshop        GIMP     Basic Creator Help     Catalog And Product Showcase     3D Meshing        3Ds Max        Sketchup        Blender Gangsters with Connections     White Hat Activities        Google Hacking        Trackers Programming Corner     Coding        Python        .Net (C#, VB, etc)        Flash        JAVA        Autoit        Batch        HTML & CSS        Javascript        PHP        Other        IMVU Homepage Codes           General           About me Panel           Messages Panel           Special Someone Panel           Visitors Panel           New Products Panel           Rankings Panel           Wishlist Panel           My Badges Panel           Outfits Panel           Url Panel           Groups Panel           Slideshow Panel           My Room Panel           Sandbox panel           Layouts     Help & Requests Free Credits     Approved Methods     Submit Methods Free Money     Approved Methods     Submit Methods Adult Corner     Get Mafia AP Here     AP Lounge        AP Social Games        Casual Dating Tips     IMVU Slave Market & Escorts