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: قالتىس - قوليازما ئىشلەيدۇ

§
يوللانغان ۋاقتى: 2016-03-19

Open in new tab

How can I open original site in new tab?

§
يوللانغان ۋاقتى: 2016-03-19

And the full size image in new tab.

Lorentz83ئاپتور
§
يوللانغان ۋاقتى: 2016-03-20

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"

§
يوللانغان ۋاقتى: 2016-03-20

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 = '

Lorentz83ئاپتور
§
يوللانغان ۋاقتى: 2016-03-23

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

§
يوللانغان ۋاقتى: 2016-03-24
تەھرىرلەنگەن ۋاقتى: 2016-03-24

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

Lorentz83ئاپتور
§
يوللانغان ۋاقتى: 2016-03-25

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.

§
يوللانغان ۋاقتى: 2016-03-27

Yes, it worked perfectly Thank you very much.

Lorentz83ئاپتور
§
يوللانغان ۋاقتى: 2016-03-27

You are welcome :smile:

جاۋاب قايتۇرۇش

جاۋاب قايتۇرۇش ئۈچۈن كىرىش.

长期地址
遇到问题?请前往 GitHub 提 Issues,或加Q群1031348184

赞助商

Fishcpy

广告

Rainyun

注册一下就行

Rainyun

一年攒够 12 元