Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Jun 14th, 2012  |  syntax: JavaScript  |  size: 0.28 KB  |  views: 1,162  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. function RETINAAAA()
  2. {
  3. var images = document.getElementsByClassName("retina");
  4. for(var i = 0; i<images.length; i++)
  5. {
  6.         images[i].width = images[i].width;
  7.         images[i].height = images[i].height;
  8.         images[i].src = images[i].src.replace(/\.[a-z]+$/,'@2x$&');
  9. }
  10. }
  11. document.onload = RETINAAAA;