fixed error with original size choice
authorStella Power
Wed, 16 Jan 2008 11:04:37 +0000 (11:04 +0000)
committerStella Power
Wed, 16 Jan 2008 11:04:37 +0000 (11:04 +0000)
js/image_nodes.js

index b7b8d23..cd5afaf 100644 (file)
@@ -37,7 +37,7 @@ function lightbox2_image_nodes() {
         }
 
         // Set the href attribute.
-                                                               var href = $(child).attr("src").replace(".thumbnail", "."+ settings.img_size).replace(/(image\/view\/\d+)(\/\w*)/, ((settings.img_size == "")?"$1/_original":"$1/"+ settings.img_size));
+        var href = $(child).attr("src").replace(".thumbnail", ((settings.img_size == "")?settings.img_size:"."+ settings.img_size)).replace(/(image\/view\/\d+)(\/\w*)/, ((settings.img_size == "")?"$1/_original":"$1/"+ settings.img_size));
 
         // Handle flickr images.
         if ($(child).attr("class").match("flickr-photo-img")) {