Skip to content

Commit

Permalink
Merged pull request #76. Thanks to walterebert, added support for ima…
Browse files Browse the repository at this point in the history
…ges with parameters and file extension check #59
  • Loading branch information
root committed Jul 18, 2017
1 parent 8b13765 commit ce46029
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ $sl-iframe-border-large: 0 none;


### Changelog
**1.11.1 - Merged pull request #76. Thanks to walterebert, added support for images with parameters and file extension check #59**
**1.11.0 - New option for src of image. e.g data attribute #70**
**1.10.7 - Added Bootstrap compatibility #69**
**1.10.6 - Merged pull requests #65. Thanks to mstaniuk**
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.11.0",
"version": "1.11.1",
"homepage": "http://andreknieriem.de/simple-lightbox",
"authors": [
"André Rinas <[email protected]> (http://andreknieriem.de)"
Expand Down
10 changes: 5 additions & 5 deletions dist/simple-lightbox.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@

/*
By André Rinas, www.andreknieriem.de
By André Rinas, www.andrerinas.de
Available for use under the MIT License
*/

;( function( $, window, document, undefined )
{
'use strict';
Expand Down Expand Up @@ -138,7 +136,9 @@ $.fn.simpleLightbox = function( options )
wrapper = $('<div>').addClass('sl-wrapper').addClass(options.className),
isValidLink = function( element ){
if(!options.fileExt) return true;
return $( element ).prop( 'tagName' ).toLowerCase() == 'a' && ( new RegExp( '\.(' + options.fileExt + ')$', 'i' ) ).test( $( element ).attr( options.sourceAttr ) );
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 );
},
setup = function(){
if(options.close) closeBtn.appendTo(wrapper);
Expand Down Expand Up @@ -263,7 +263,7 @@ $.fn.simpleLightbox = function( options )
if( options.animationSlide ) {
if( canTransisions ) {
slide(0, 100 * dir + 'px');
setTimeout( function(){ slide( options.animationSpeed / 1000, 0 + 'px'), 50 });
setTimeout( function(){ slide( options.animationSpeed / 1000, 0 + 'px'); }, 50 );
}
else {
css.left = parseInt( $('.sl-image').css( 'left' ) ) + 100 * dir + 'px';
Expand Down
4 changes: 2 additions & 2 deletions dist/simple-lightbox.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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.11.0",
"version": "1.11.1",
"description": "Touch-friendly image lightbox for mobile and desktop with jQuery",
"main": "dist/simple-lightbox.js",
"repository": {
Expand Down

0 comments on commit ce46029

Please sign in to comment.