rlightbox2
rlightbox2 copied to clipboard
Duplicate link = extra image preview.
I have double link in my html: `

So this produces double images preview.
I've fixed this in sources for my project. I do not know how to submit the file, so I just post code if you want to update the plugin:
extra option:
preventSameUrl : false,
function global.addToSet at the end:
// set exists yet - just add element to it
if (_options.preventSameUrl){
var found = false;
for (var i = 0; i < _sets[_setName].length && !found; i++){
if (_sets[_setName][i].url == setElement.url) found = true;
}
if (!found) _sets[_setName].splice( _setElementIndex, 0 , setElement );
} else {
_sets[_setName].splice( _setElementIndex, 0 , setElement );
}