Handy Image

Shows just fullsize Image with hotkeys & without pop-ups on many image-hosting sites

< Feedback on Handy Image

Question/comment

MrH
§
Posted: 2016-03-14

FIX - Imgur albums not displaying correctly

With Handy Image installed a photo album will only show the first photo, giving you no option to view the rest. With Handy Image disabled albums display correctly again.

OwynAuthor
§
Posted: 2016-03-14

example link?

§
Posted: 2016-03-17

Same behavior here. For some reason I can't post a question in the greasyfork feedback section. Any imgur album, and I believe on the https side as well. The 'r' key will reload the album as expected.

I'm running firefox x64 (the official 64-bit release versions have been out for a few months now, but I can't remember if the imgur album bug was associated with it. I do however believe that using x64 will NOT auto-update the script for some reason -- and I don't know if it's just yours or any scripts in general. I have to manually download the .js and drag the file into the list of user scripts to install it. Simply clicking on a .js link will just open the text in firefox.

MrH
§
Posted: 2016-03-17
Edited: 2016-03-17

example link?

http://imgur.com/a/r8u2X

I only see the first image with Handy Image active, with it disabled I see all the images.

§
Posted: 2016-03-17
Edited: 2016-03-17

example link?

http://imgur.com/a/r8u2X

I only see the first image with Handy Image active, with it disabled I see all the images.

Pressing 'r' when the first image is displayed should by default load the album natively. See if that works...it's just a workaround for now. For me, I've had this bug for at least a month, definitely on the 1-mar-2016 version. How about you? And do you have custom settings on script like a different background color?

I noticed you're using ff 45.0, assuming you have the 32-bit version, and the author is still on 44.0. I can't remember when I updated to 45.0, but the calendar says it was released on 8-mar-2016, but I could have sworn it happened before that.

Nice pizza btw.

§
Posted: 2016-03-17
Edited: 2016-03-17

Ok, I took a look at the code and here's what I think is happening (I know very little code, mostly java and none of javascript): Line 1139 of the script:
document.head.querySelector('meta[property="og:image"]');
evaluates to "true" because the album MrH provided, there's this suspicious line 65:

Here's what I'm guessing, Imgur re-tooled their code to include a facebook "plug-in" of sorts and querySelector finds that image property in the album page so the outer "if" loop executes, then the inner "if" loop evaluates to false and so "then" array i.src is now i.content, that truncates "?fb".

§
Posted: 2016-03-17
Edited: 2016-03-17

Ok I found a solution. The simple "working" workaround is to add "*://imgur.com/a/*" (without quotes) to Handy Image options -> user settings -> excluded pages. Click OK and you're done.

For the author, the issue might be blamed on this commit: https://github.com/Owyn/HandyImage/commit/f88ef42a6ea46c749d6d9eac909f0f27d99ac808
I suggest making line 1143 to this:
if((f && f.content.indexOf("/a/") != -1) || f.content.indexOf("/gallery/") != -1) || i.content.indexOf("/images/logo") != -1)
I tested it, and it works. But that makes me wonder why the previous commit worked...although again I could have sworn the issue was in 2016.03.01 as well. I didn't check the other branches but I'd be curious if anything was released between 2016.01.31 and 2016.03.01. If my other post above was incorrect, then perhaps "twitter:card" was equal to "gallery" for album pages, I have no idea.

OwynAuthor
§
Posted: 2016-03-17

But that makes me wonder why the previous commit worked...

Because imgur website likes to have different gallery formats on their website and sometime change those...

Fixed.

§
Posted: 2016-03-20

I found an additional complication and the script will run on some albums, and I know why. Album titles are "optional" in imgur so if you make an album with no title, the title reverts to:
Imgur: The most awesome images on the Internet
So these albums will run the script since that's not " - Album on Imgur", as you know.
I'm not sure about "gallery" albums as well, but I assume the titles on those albums are optional as well. I don't think you can rely on the document title because single images can be unnamed as well and will still show the same title above. Other than my suggestion above, I can't think of a more elegant way to fix.

OwynAuthor
§
Posted: 2016-03-20

fixed using your suggestion

Post reply

Sign in to post a reply.