Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your feedback on a survey! Each completed response supports our community and gives you a chance to win a $25 Amazon gift card!


No more jQuery lightbox for images, plox kthx


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 fastcall22   Crossbones+   -  Reputation: 4478

Posted 06 November 2012 - 08:56 PM

img.bbc_img {
	cursor: pointer;
}

A true story:
[attachment=12125:dumb.png]

"This image must be a link because my cursor icon is changed to that of typical text links," says I.
"Oh, you're trying to open this image in another tab with middle-click?" says lightbox, "cool story bro! Mind if I just chill?"
"Okay, so middle-clicking doesn't work, let's try 'Open link in new tab' from the context menu"
"Haha, nope. You mad, bro? Why have the context menu, when you obviously want to see the image in a slow-to-animate popup window!"
"Gah, why did it do that?! This behavior is unexpected and unwanted!", says the increasingly frustrated user that is me, "-- okay, fine, whatever. I'll examine the image in this dumb little window."

(A short time later:)
"Okay, I need to examine the pixels of this image by zooming in..."
"Foolish mortal! Do you think that because this image is in the foreground and is focused, that you are in your browser's 'image viewer mode'? Are you so blind as to my own awesomeness that you forgot that there is still the web page in the background? You will scale the entire page," taunts lightbox!
"Uhh, okay. So instead of zooming in just the image, I have also scaled the web page in the background and moved the box containing the image offscreen."

(Much later:)
"There are a series of images I would like to download in parallel such that I by the time I am finished viewing the first image, the other images will be ready for viewing"
"Nope! You can only look at one image at a time!"
"What!"
"And you have to suffer through the animation between each one! *Evil laughter*!"

(Today:)
"I cannot take it anymore! Thread after thread of image attachments, and the same thing over and over! I must exact let my rage be known throughout 'GDNet Comments, Suggestions and Ideas' such that others may feel my pain! This excessively large image, when previewed, should demonstrate everything that makes lightbox inappropriate for for images!"

TLDR:
Lightbox makes plain-ol' images behave as links, when they aren't. If they are links, then middle-click and right-click should behave as regular links should. Call me old-fashioned, but I miss <a href="link_to_larger_image"><img thumbnail/></a>.

Edited by fastcall22, 06 November 2012 - 09:05 PM.

c3RhdGljIGNoYXIgeW91cl9tb21bMVVMTCA8PCA2NF07CnNwcmludGYoeW91cl9tb20sICJpcyBmYXQiKTs=

Sponsor:

#2 fastcall22   Crossbones+   -  Reputation: 4478

Posted 10 November 2012 - 03:37 PM

Okay, I've made a greasemonkey script that seems to work on a variety of sites...
(function(){
    var $ = unsafeWindow.jQuery;
    if ( !$ )
        return;
    $('*[rel*=lightbox] img').each(function(){
        var a = $('<a>').attr('href',$(this).attr('src'));
        a.insertBefore($(this));
        $(this).detach();
        a.append($(this));
    });
    $('.lightview').removeClass('lightview');
    $('*[rel*=lightbox]').removeAttr('rel');
})();

Edited by fastcall22, 21 January 2013 - 10:21 AM.

c3RhdGljIGNoYXIgeW91cl9tb21bMVVMTCA8PCA2NF07CnNwcmludGYoeW91cl9tb20sICJpcyBmYXQiKTs=




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS