Google Images direct link

NOTE: Since July 2016 this script is unmaintained. It is here just for historical purposes and to let other people fork it. Adds direct links to images and pages in google image search

< Feedback on Google Images direct link

Review: OK - script works, but has bugs

§
Posted: 2016-04-06

Bug

Thumbnails redirect to https://www.google.com/false

§
Posted: 2016-04-06
Edited: 2016-04-07

Yes, I just started noticing this, too, and came here for a fix or to report it.

I've been looking at the code, trying to fix it myself, and it seems that the firstOrNull() function is not returning the correct value anymore. That's where the "false" in the created link URL is stemming from.

Is anyone supporting this script?

I am using it on Pale Moon 26.2.0 and Greasemonkey 1.15.1-signed.
(latest versions)

§
Posted: 2016-04-07

Confirmed

Lorentz83Author
§
Posted: 2016-04-07

I'm the author and I still support the script. Unfortunately this google update changed the way the page is generated and the script cannot get the image URLs anymore.
I'm working on a fix, but it may require few days because now the image link is loaded asynchronously, therefore I must understand which event to listen to get it.
In the meantime keep an eye on this page and disable the script.

Thank you

§
Posted: 2016-04-07

Thanks.

It does seem like a fairly fundamental issue, and I figured Google made some change that broke it.

I thought about trying having the script run later, maybe after a pause of 1/4 or 1/2 second or so, after the page is loaded, but I don't know if that would fix it, or not.

§
Posted: 2016-04-07
Edited: 2016-04-07

I put the whole "execute immediately" if/then statement code in a function doItLater() and had it called on LOAD at the very bottom and it works:

window.addEventListener ('load', doItLater, false);

NOTE: This is only a semi-fix. Sometimes it doesn't get all of the image links modified. This might be due to the asynchronous load of the images. When I go down the page and hit a FALSE link, if I RELOAD the page, it seems to correct the non-modified items. So it is a semi-work-around that more or less seems to work.

Lorentz83Author
§
Posted: 2016-04-07

Exactly, images are loaded asynchronously therefore introducing a delay is just a workaround that "works" only for the first few images.
I found a better event to listen, but it requires some major work to adapt the script. Therefore, considering that the script is very old and contains some dead code, I prefer to use this major update to clean also a little the code.
Hopefully I'll release the new version in a couple of days, and then I'll need your help in debugging it, because I'm removing some old workarounds that seems not necessary anymore, but this may remove also some minor feature that I totally forgot to check.

Thank you

§
Posted: 2016-04-07

Hi, thanks for still supporting this script. If it helps I found an old script by "Dwoo" called "google images direct links" from 2014 that is still working (a bit slow because you see the google frame but then inmediately redirects to the image link), maybe you can look at the code to fix your script...

http://userscripts-mirror.org/scripts/show/48293

greetings from Argentina

Deleted user 128
§
Posted: 2016-04-07

There was a script here that has been removed, "Direct Google Images" at https://greasyfork.org/en/scripts/6674-direct-google-images, still available on Google Cache at http://webcache.googleusercontent.com/search?q=cache:https%3A%2F%2Fgreasyfork.org%2Fen%2Fscripts%2F6674-direct-google-images

Maybe that can help.

Lorentz83Author
§
Posted: 2016-04-08

Thank you to everyone.
The script has been fixed in the version 7.0
Most of the code has been rewritten to be faster and simpler to maintain and a lot of dead code useful for older versions (mostly basic search) has been deleted;
Some features (like the direct links from the google web search) are currently missing. They will be reintroduced, but feel free to fill a bugreport if you think I forgot any of them.

Deleted user 128
§
Posted: 2016-04-08

'Google Images direct link' 7.0 running fine - Nice work, Lorentz83

§
Posted: 2016-04-09

Yay!

§
Posted: 2016-04-11

Made an account here just to say thank you for the swift update. I'd be truly lost without your script.

Lorentz83Author
§
Posted: 2016-04-11

@inphinitechaos thank you, I really appreciate :smile:

§
Posted: 2016-05-03

Seems to work. Thanks.

§
Posted: 2016-05-09
Edited: 2016-05-09

I created a account too. To say thank you as well. Your a life saver! Anyway to donate ?

Lorentz83Author
§
Posted: 2016-05-09

Thank you @ng4ever, I'm very happy to know it :smile:
I currently do not have any way to accept donations. I develop these scripts mostly for fun and because I need them too.
But I really appreciate your thought.

§
Posted: 2016-05-10

Hello, and thank you for your work. My problem is it works fine with google image, but stops google video from working : if i click on a thumnail on the google video page (when Google Images direct link is activated), i get an error message. I have to click on the link. Any idea why?

Lorentz83Author
§
Posted: 2016-05-11

@mousson, you just found a bug! The script handles the video preview like it was an image, but since there is not the data required it breaks the video link.
I'm entering in a very busy time, either I can fix it in the next few days or I'll need few weeks. But I'll definitely work on it. Thank you for the report :)

Post reply

Sign in to post a reply.