Skip to content

Commit

Permalink
javascript bugfix for IE11 // fixes #66
Browse files Browse the repository at this point in the history
IE11 does not support arrow functions
https://stackoverflow.com/questions/38595690/
  • Loading branch information
tofi86 committed Sep 26, 2019
1 parent 7fe7228 commit 05a6448
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions assets/javascripts/lightbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ $(document).ready(function() {
// Add Fancybox to image links
$("div.attachments a.lightbox")
.add("div.attachments a.lightbox_preview")
.add("div.journal ul.details a:not(.icon-download)").filter((index,elem) => $(elem).attr('href').match(extensionRegexImage))
.add("div.journal ul.details a:not(.icon-download)").filter(function(index,elem) { $(elem).attr('href').match(extensionRegexImage) })
.add("div.journal div.thumbnails a")
.add("div.wiki a.thumbnail")
.add(".controller-dmsf #browser a.lightbox")
Expand All @@ -112,8 +112,8 @@ $(document).ready(function() {

// Add Fancybox to PDF links
$("div.attachments a.pdf")
.add("div.journal ul.details a:not(.icon-download)").filter((index,elem) => $(elem).attr('href').match(/\.pdf$/i))
.add("div.journal div.thumbnails a").filter((index,elem) => $(elem).attr('href').match(/\.pdf$/i))
.add("div.journal ul.details a:not(.icon-download)").filter(function(index,elem) { $(elem).attr('href').match(/\.pdf$/i) })
.add("div.journal div.thumbnails a").filter(function(index,elem) { $(elem).attr('href').match(/\.pdf$/i) })
.fancybox({
type : 'iframe',
prevEffect : 'none',
Expand Down

0 comments on commit 05a6448

Please sign in to comment.