From e6750f9bb93cad8c9ab97db7d4a918391a49ff10 Mon Sep 17 00:00:00 2001 From: Igor Pavelek Date: Mon, 6 Dec 2010 20:06:56 +0100 Subject: [PATCH 1/2] Accept links with a query string for images --- src/facebox.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/facebox.js b/src/facebox.js index 5ad90ed..d74dec6 100644 --- a/src/facebox.js +++ b/src/facebox.js @@ -172,7 +172,7 @@ makeCompatible() var imageTypes = $.facebox.settings.imageTypes.join('|') - $.facebox.settings.imageTypesRegexp = new RegExp('\.(' + imageTypes + ')$', 'i') + $.facebox.settings.imageTypesRegexp = new RegExp('\.(' + imageTypes + ')\?', 'i') if (settings) $.extend($.facebox.settings, settings) $('body').append($.facebox.settings.faceboxHtml) From e4a0101596cd269f8337920564c8d33e193e8cbe Mon Sep 17 00:00:00 2001 From: Igor Pavelek Date: Mon, 6 Dec 2010 22:53:24 +0100 Subject: [PATCH 2/2] Both image links with a query string and without are displayed correctly --- src/facebox.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/facebox.js b/src/facebox.js index d74dec6..118e8ab 100644 --- a/src/facebox.js +++ b/src/facebox.js @@ -172,7 +172,7 @@ makeCompatible() var imageTypes = $.facebox.settings.imageTypes.join('|') - $.facebox.settings.imageTypesRegexp = new RegExp('\.(' + imageTypes + ')\?', 'i') + $.facebox.settings.imageTypesRegexp = new RegExp('\.(' + imageTypes + ')($|\\?)', 'i') if (settings) $.extend($.facebox.settings, settings) $('body').append($.facebox.settings.faceboxHtml)