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
And the full size image in new tab.
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"
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 = '
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
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
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.
Yes, it worked perfectly Thank you very much.
You are welcome :smile:
Open in new tab
How can I open original site in new tab?