Skip to content

Commit ac77beb

Browse files
author
Tobias Fischer
committed
fix #43: wrong jpe?g regex
1 parent 4cc4cf4 commit ac77beb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

assets/javascripts/lightbox.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ $(document).ready(function() {
77

88
// modify thumbnails and magnifier links in journal details -> add filename to url to support fancybox preview
99
$("div.journal div.thumbnails a, div.journal ul.details li a:not([title])").attr('href', function(i, v){
10-
if($(this).attr('href').match(/(png|jp?eg|gif|pdf)$/i)) {
10+
if($(this).attr('href').match(/(png|jpe?g|gif|pdf)$/i)) {
1111
return v.replace(/\/attachments\/(\d+)/g,'/attachments/download/$1');
1212
} else {
1313
return v;
@@ -16,7 +16,7 @@ $(document).ready(function() {
1616

1717
// add a magnifier icon before download icon for images and pdf
1818
$("div.journal ul.details li a.icon-download").each(function(i, obj) {
19-
if($(this).attr('href').match(/\.(png|jp?eg|gif|pdf)$/i)) {
19+
if($(this).attr('href').match(/\.(png|jpe?g|gif|pdf)$/i)) {
2020
var icon = $(this).clone().attr('class', function(i, v){
2121
return v.replace(/-download/g,'-magnifier');
2222
});

0 commit comments

Comments
 (0)