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: Good - script works

§
Posted: 19.03.2016

Open in new tab

How can I open original site in new tab?

§
Posted: 19.03.2016

And the full size image in new tab.

Lorentz83Author
§
Posted: 20.03.2016

You can middle click on the image to open it in a new tab and middle click on the image name at the bottom to open its page in a new tab. See here.

If it is difficult to middle click (i.e. on a touchpad), you can always right click and choose "open in a new tab"

§
Posted: 20.03.2016

Actually I made a modification, left cllick to name opens it in new tab. But could you help me to also open image in new tab via left click?

span.innerHTML = '

Lorentz83Author
§
Posted: 23.03.2016

The problem is that there's some google code which messes up the links: when you click instead of opening the link as supposed, a javascript function read the href attribute and redirect you to the new page. This is why the target="_blank" does not work for the images. The a.addEventListener('click', stopEvent, false) should prevent also this behavior but, for some reasons I don't understand, it does not.

The easiest hack that I found consist in adding

GM_openInTab(event.target.parentElement.href)
event.stopPropagation() 

to the beginning of the stopEvent function.

Remember also to replace // @grant none with // @grant GM_openInTab

§
Posted: 24.03.2016
Edited: 24.03.2016

Hi, there's a bug in new modification; It opens image in new tab but it also opens the image in Google Image search tab.
Video to show it:
http://www40.zippyshare.com/v/dCp3KKcp/file.html

Lorentz83Author
§
Posted: 25.03.2016

Yes, the hack is more difficult than I thought because there are different js events to block. You can try this one
https://gist.github.com/Lorentz83/06d8499c8f58aba4415e
it appears to work correctly.

§
Posted: 27.03.2016

Yes, it worked perfectly Thank you very much.

Lorentz83Author
§
Posted: 27.03.2016

You are welcome :smile:

Post reply

Sign in to post a reply.