Change Blogger popular post thumbnail size

mspotilas Jul 7th, 2012 13,149 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script type='text/javascript'>
  2. //<![CDATA[
  3. // Change Blogger popular post thumbnail size using jQuery / MS-potilas 2012
  4. // Put this code in a html/javascript gadget (after popular posts gadget), or before </body>.
  5. // See
  6. var newSize = 100;  // this is the new thumbnail size, you can change this
  7. $(".popular-posts .item-thumbnail img").each(function() {
  8.     var oldSize = $(this).attr("width");
  9.     $(this).attr("width", newSize); $(this).attr("height", newSize);
  10.     $(this).attr("src", $(this).attr("src").replace("/s"+oldSize+"-c/", "/s"+newSize+"-c/"));
  11. });
  12. //]]>
  13. </script>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand