Permalink
Browse files

fix js condition

  • Loading branch information...
1 parent b879c6a commit 12d3a8ae45f79ae1cfc036a6cd3c584419f153c7 @egorkhmelev committed Mar 9, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 index.html
View
@@ -22,11 +22,11 @@
jQuery(document).ready(function retina_init() {
var RETINA_REPLACE_SELECTOR = 'img.replace-2x';
- if( 'devicePixelRatio' in window and window.devicePixelRatio == 2 ){
+ if( 'devicePixelRatio' in window && window.devicePixelRatio == 2 ){
var img_to_replace = jQuery( RETINA_REPLACE_SELECTOR ).get();
for (var i=0; i < img_to_replace.length; i++) {
var src = img_to_replace[i].src;
- src = src.replace(/\.(png|jpg|gif)+$/, "@2x.$1");
+ src = src.replace(/\.(png|jpg|gif)+$/i, "@2x.$1");
img_to_replace[i].src = src;
};
}

0 comments on commit 12d3a8a

Please sign in to comment.