Lorentz83 / userscripts

My Greasemonkey userscripts
8 stars 0 forks source link

5.4 doesn't open image in new tab/window #1

Closed francwalter closed 9 years ago

francwalter commented 9 years ago

Version 5.4 doesn't open an new tab if I click on the image in googles image search result. This is with Firefox 35.0.1 on Windows 8.1 (64) and Firefox 35.0.1 on Mac OS 10.10 the same. Switched back to 5.3, works perfectly.

Lorentz83 commented 9 years ago

Images in google search result are very tricky to handle because the code to display them changes quite frequently. Moreover the result is very differnt from country to country. What localization of google are you using? Can you send me a search url?

francwalter commented 9 years ago

DE All searches, e.g.: https://www.google.de/search?newwindow=1&safe=off&biw=1280&bih=872&tbm=isch&sa=1&q=emilia%20clarke&=&oq=&gs_l=

Lorentz83 commented 9 years ago

Oh, sorry. I thought you meant the images showed on the top of the "normal" website search. It sounds very strange, because that release was a bugfix exactly for this problem (https://greasyfork.org/en/forum/discussion/2898/x). Moreover the last version works for me (Firefox 35 in Linux) on the url you provided. Now it could be caused by two different reasons:

  1. firefox for linux handles mouse event in a different way (I'll check on a windows machine) or
  2. I'm using different servers even when looking on google.de.

If it is the second case we are just in the middle of an update. As soon as the European servers will be updated too, the old version will stop working in favor of the new one. Please warn me if this happens. In the meanwhile I'll investigate the first option.

francwalter commented 9 years ago

Maybe you very right! Now neither working in 5.3 nor 5.4 on my Mac OS 10.10 with Firefox 35.

Lorentz83 commented 9 years ago

So wait for few other days. If it does not work by the end of the next week I'll search a German proxy to debug it.

francwalter commented 9 years ago

But on my Window PC the 5.3 script still works (not the 5.4). Opens images in a new tab. There is no preview on mouseover, I think this was once but not sure. It is not when script is disabled anyway.

Lorentz83 commented 9 years ago

Hi, I really cannot reproduce the bug. Do you have any other script or extension that could interfere with the google page?

francwalter commented 9 years ago

OK, now on PC (Windows 8.1-64) I tested the new version 5.4b on a brand new Firefox 35.0.1 profile: Does not open in a new tab but does open the image directly. Does not show image preview when hover. Does open the real link when click on the link at the bottom of the picture.

What I have in version 5.3 still is: Does open in a new tab, does open image directly. But does not give preview when hover.

I don't know if the preview on hover is still a possibility however.

Anyway, 5.3 is the version which does nearest fitting to my desire, I will stay on this :)

francwalter commented 9 years ago

This issue is not fixed. Neither on Mac OS 10.10.2 with Firefox 36.0.1 nor on Windows 8.1 (64) with Firefox 36.0.1 (with new Profile!) the click on a image in the search result of Google Image Search would open the image in a new Tab. So Version 5.4c does not open in new tab, but as I read the description now a bit better, there is no (more) talk about opening in a new tab, just opening directly the full image and that is working.

Lorentz83 commented 9 years ago

Sorry, I'm not sure if we are talking about the same problem, because I really cannot reproduce your bug. My script removes the javascript that handles the preview (the big gray box that popup with a bigger image, the buttons "visit page", "view image" and the list of similar images) and replace it with normal anchors. This means that when you click on the image (the title at the bottom) the current tab loads the image (the webpage containing the image).

It's a Firefox feature that when you middle click (usually the mouse wheel or a multiple tap on the touchpad) on a link, it is opened in a new tab instead of the current one. Since my script replace all the google js with a normal link, if you middle click on the image a new tab is opened.

The bug that I fixed was related to a difference in handling the js events that prevented middle click working on Chrome and left click working on Firefox.

My script never automatically opened the image in a new tab, if this happened it was because you had some other script, extension or configuration that interfered with it.

So, my point is that when you hover the mouse on a preview, you should see at the bottom of the window the url of the image. If you click on the preview it opens the image in the same tab, if you middle click on it, it opens the image in a new tab. Is this working as expected?