Skip to content

Commit

Permalink
Added webp in fileExt list #135, removed hardcoded a-tag in isValidLi…
Browse files Browse the repository at this point in the history
…nk function #134
  • Loading branch information
root committed Apr 11, 2019
1 parent 8024c27 commit 6e29c3c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ $add-vendor-prefixes: true !default;


### Changelog
**1.17.1 - Added webp in fileExt list #135, removed hardcoded a-tag in isValidLink function #134**
**1.17.0 - Merged pull request #132. Added double click to zoom for desktop browsers - Thanks to coderkan**
**1.16.3 - Merged pull request #126,#127 - Thanks to jieter**
**1.16.2 - Added featured #124 - Add a class to html element if lightbox is open**
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simplelightbox",
"version": "1.17.0",
"version": "1.17.1",
"homepage": "http://simplelightbox.com/",
"authors": [
"André Rinas <info@andrerinas.de> (https://www.andrerinas.de)"
Expand Down
7 changes: 4 additions & 3 deletions dist/simple-lightbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
By André Rinas, www.andrerinas.de
Documentation, www.simplelightbox.de
Available for use under the MIT License
1.17.0
1.17.1
*/
;( function( $, window, document, undefined )
{
Expand All @@ -28,7 +28,7 @@ $.fn.simpleLightbox = function( options )
closeText: '×',
swipeClose: true,
showCounter: true,
fileExt: 'png|jpg|jpeg|gif',
fileExt: 'png|jpg|jpeg|gif|webp',
animationSlide: true,
animationSpeed: 250,
preloading: true,
Expand Down Expand Up @@ -88,6 +88,7 @@ $.fn.simpleLightbox = function( options )
return $related;
},
objects = (options.rel && options.rel !== false) ? getRelated(options.rel, $(this)) : this,
tagname = objects.get()[0].tagName,
transPrefix = transPrefix(),
globalScrollbarwidth = 0,
canTransisions = (transPrefix !== false) ? true : false,
Expand Down Expand Up @@ -161,7 +162,7 @@ $.fn.simpleLightbox = function( options )
if(!options.fileExt) return true;
var filEext = /\.([0-9a-z]+)(?=[?#])|(\.)(?:[\w]+)$/gmi;
var testExt = $( element ).attr( options.sourceAttr ).match(filEext);
return testExt && $( element ).prop( 'tagName' ).toLowerCase() == 'a' && ( new RegExp( '\.(' + options.fileExt + ')$', 'i' ) ).test( testExt );
return testExt && $( element ).prop( 'tagName' ).toUpperCase() == tagname && ( new RegExp( '\.(' + options.fileExt + ')$', 'i' ) ).test( testExt );
},
setup = function(){
if(options.close) closeBtn.appendTo(wrapper);
Expand Down
4 changes: 2 additions & 2 deletions dist/simple-lightbox.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simplelightbox",
"version": "1.17.0",
"version": "1.17.1",
"description": "Touch-friendly image lightbox for mobile and desktop with jQuery",
"main": "dist/simple-lightbox.js",
"style": "dist/simplelightbox.scss",
Expand Down

0 comments on commit 6e29c3c

Please sign in to comment.