rlightbox2 icon indicating copy to clipboard operation
rlightbox2 copied to clipboard

Duplicate link = extra image preview.

Open djest opened this issue 12 years ago • 0 comments

I have double link in my html: `

My image
`

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 );
            }

djest avatar Sep 05 '12 08:09 djest