$ diff lightbox.js.org lightbox.js
102c102
< $('<divid="lightboxOverlay"class="lightboxOverlay"></div><divid="lightbox"class="lightbox"><divclass="lb-outerContainer"><divclass="lb-container"><imgclass="lb-image"src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="/><divclass="lb-nav"><aclass="lb-prev"href=""></a><aclass="lb-next"href=""></a></div><divclass="lb-loader"><aclass="lb-cancel"></a></div></div></div><divclass="lb-dataContainer"><divclass="lb-data"><divclass="lb-details"><spanclass="lb-caption"></span><spanclass="lb-number"></span></div><divclass="lb-closeContainer"><aclass="lb-close"></a></div></div></div></div>').appendTo($('body'));
---
> $('<divid="lightboxOverlay"class="lightboxOverlay"></div><divid="lightbox"class="lightbox"><divclass="lb-outerContainer"><divclass="lb-container"><imgclass="lb-image"src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="/><divclass="lb-nav"><aclass="lb-prev"href=""></a><aclass="lb-next"href=""></a><aclass="lb-prev-rev"href=""></a><aclass="lb-next-rev"href=""></a></div><divclass="lb-loader"><aclass="lb-cancel"></a></div></div></div><divclass="lb-dataContainer"><divclass="lb-data"><divclass="lb-details"><spanclass="lb-caption"></span><spanclass="lb-number"></span></div><divclass="lb-closeContainer"><aclass="lb-close"></a></div></div></div></div>').appendTo($('body'));
164a166,193
> this.$lightbox.find('.lb-prev-rev').on('click', function() {
> if (self.currentImageIndex === 0) {
> self.changeImage(self.album.length - 1);
> } else {
> self.changeImage(self.currentImageIndex - 1);
> }
> return false;
> });
>
> this.$lightbox.find('.lb-next-rev').on('click', function() {
> if (self.currentImageIndex === self.album.length - 1) {
> self.changeImage(0);
> } else {
> self.changeImage(self.currentImageIndex + 1);
> }
> return false;
> });
>
> /*
> Show context menu for image on right-click
>
> There is a div containing the navigation that spans the entire image and lives above of it. If
> you right-click, you are right clicking this div and not the image. This prevents users from
> saving the image or using other context menu actions with the image.
>
> To fix this, when we detect the right mouse button is pressed down, but not yet clicked, we
> set pointer-events to none on the nav div. This is so that the upcoming right-click event on
>
275c304
< this.$lightbox.find('.lb-image,.lb-nav,.lb-prev,.lb-next,.lb-dataContainer,.lb-numbers,.lb-caption').hide();---> this.$lightbox.find('.lb-image, .lb-nav, .lb-prev, .lb-next, .lb-prev-rev, .lb-next-rev, .lb-dataContainer, .lb-numbers, .lb-caption').hide();
398a428,450
> if (this.options.reverse) {
> if (this.album.length > 1) {
> if (this.options.wrapAround) {
> if (alwaysShowNav) {
> this.$lightbox.find('.lb-prev-rev, .lb-next-rev').css('opacity', '1');
> }
> this.$lightbox.find('.lb-prev-rev, .lb-next-rev').show();
> } else {
> if (this.currentImageIndex > 0) {
> this.$lightbox.find('.lb-prev-rev').show();
> if (alwaysShowNav) {
> this.$lightbox.find('.lb-prev-rev').css('opacity', '1');
> }
> }
> if (this.currentImageIndex < this.album.length-1){> this.$lightbox.find('.lb-next-rev').show();
> if (alwaysShowNav) {
> this.$lightbox.find('.lb-next-rev').css('opacity', '1');
> }
> }
> }
> }
> } else {
418a471
> }