Google Image Relinker Mod

By thorbenhauer Last update Oct 27, 2010 — Installed 57,644 times.

Archived Comments (locked)

in
Subscribe to Archived Comments 34 posts, 6 voices



Jesse Andrews Admin

The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008)

 
gaikokujin k... User

Doh! Sorry dude, i was thinking one thing but typing another. About the script, i installed the new one 0.4.3 and still nada though perhaps because i am not modifying the script correctly? I only use the images.google.com which is already included, while i use the images.google.com i am not in the US would that make a difference? (In the address bar it indicates i am at images.google.com, i don't seem to have been redirected). At the moment it gives me two links, one dead link and one to the google framed view. If i am already using images.google.com is there any other modifications i should be making? Cheers -Gaiko

 
thorbenhauer Script's Author

I'm not Jesse, but never mind *g*
First try the new version, because it fixes a small bug.

For Opera you have to add your localized Google domain in the source code. There are already two:

// @include       http://images.google.com/images?*
// @include       http://images.google.de/images?*

So this script works for google.com and google.de. If you want to add support for p.e. co.uk, just add the line
// @include       http://images.google.co.uk/images?*

Then you should place the downloaded user.js file in your Opera userscripts folder.

Just ask if there a further questions.

 
gaikokujin k... User

Hi Jesse, I am trying to get the script to work with Opera and google images. I noticed your comment about the placeholder and opera and in the script you mentioned opera doesn't understand tld but (forgive me) I didn't quite catch how the script needs to be modified to properly work with google images. At the moment the created direct link in google images is pretty much a dead link. Any clafification (for a noob) would really be appreciated. Cheers -Gaiko

 
thorbenhauer Script's Author

Try with 0.4.2. The fix also handles the flickr bug.
Thanks again :-)

 
ekbworldwide Scriptwright

Thanks for the bug fixes - I found another bug.

"Ari Emanuel" site:muckety.com - Google Image Search
http://images.google.com/images?um=1&hl=en&lr=&...

If you click on a chart - the link breaks.

example

your script's image link
http://www.muckety.com/maps/4848/Ari-Emanuel.pn...

the real image link
http://www.muckety.com/maps/4848/Ari-Emanuel.pn...

page link

Ari Emanuel relationship map - Muckety.com
http://www.muckety.com/Ari-Emanuel/4848.muckety

---

edit

I just noticed - that on the page - it's not a static image. So there may be no bug involved...

 
thorbenhauer Script's Author

1.
Google implements this feature, not me. ;-) The new version sets the domain according to the linked page, not the linked image. Hope this fixes this issue.
2. + 3.
Fixed.

Thanks for reporting!

 
ekbworldwide Scriptwright

Note - I have version 0.4

________________
1
>> Therefore it's not really a bug, it's a feature *g*

Okay. But why are you implementing the "feature"?

rsmccain.blogspot.com is rsmccain.blogspot.com

You could check that the link title matches the link href.

I had "not a bug - feature" experience today trying - and failing - to get Firefox to sort live bookmarks together with bookmarks - instead of sorting them separately. Finally - I had to install an experimental add-on just to sort them the way I want. Why it can't be set in about:config is beyond me.

________________
2

There's a flickr bug.

flickr images ending with "?v=0" can't be opened in a new tab. The "image is unavailable" placeholder is what's shown instead.

example

site:flickr.com "Me and Morgan Nagler" - Google Image Search
http://images.google.com/images?imgsz=small%7Cm...

Me and Morgan Nagler on Flickr - Photo Sharing!
http://flickr.com/photos/merfiebrown_rn/292684880/

________________
3

There's a blogspot bug.

blogger.com images open in a new tab...

site:blogger.com film-noir - Google Image Search
http://images.google.com/images?imgsz=small%7Cm...

-but-

blogspot.com images cause the dreaded dialog box problem

site:blogspot.com film-noir - Google Image Search
http://images.google.com/images?imgsz=small%7Cm...

 
thorbenhauer Script's Author
The title is "www.sideboob.org" but the href is: http://rsmccain.blogspot.com/2008/08/sarah-pali...

The URL for the picture can be found in the src code of the rsmccain blog.
I'm all about getting the random Google-search traffic (<em>e.g.,</em> <a href="http://www.sideboob.org/pictures/anne_hathaway_01.jpg">Anne Hathaway</a>).<br />
Same for the second example:
<a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://i157.photobucket.com/albums/t72/petetarr/HotGirls1.jpg"><img style="cursor: pointer; width: 400px;" src="http://img382.imageshack.us/img382/6339/hotgirls1xn1.jpg" alt="Hot Girls Bikini" border="0" /></a>
Seems that Google doesn't limit their image crawler to img tags. Obviously the crawler looks for href-linked images too. Therefore it's not really a bug, it's a feature *g*
 
ekbworldwide Scriptwright

>> @ekbworldwide
>> Could you explain the problem more precisely? I can't see a glitch with your links.

Hmm... the blog seems to have been deleted. I'll post a new link if I experience the problem again.

 
ekbworldwide Scriptwright

I found a bug - I reinstalled just to be sure I had the newest version - the bug remains.

Sometimes (rarely?) the link under the image has a title that doesn't match the href.

I'm not posting bikini images to be cute. I never noticed the bug before and this is where I found it:

palin bikini - Google Image Search
http://images.google.com/images?num=100&hl=en&l...

examples


The title is "www.sideboob.org" but the href is:
http://rsmccain.blogspot.com/2008/08/sarah-pali...


The title is "i157.photobucket.com" but the href is
http://thongbikini.blogspot.com/

 
thorbenhauer Script's Author

@ekbworldwide
Could you explain the problem more precisely? I can't see a glitch with your links.

 
ekbworldwide Scriptwright

If you make the image full-sized
1 The frame is extremely difficult to move.
2 The top of the image is chopped off.
The full-sized image is fine in a new tab.
http://images.google.com/imgres?imgurl=http://i...

The google image search - it's the first image on the left.
http://images.google.com/images?num=100&hl=en&l...

 
thorbenhauer Script's Author

I've implemented a workaround for blogger images based on your proposal. Nice idea indeed!

 
ekbworldwide Scriptwright

About blogger images

This code I wrote is laughable...
http://pastebin.mozilla.org/544990
... but it does work to stop the dialog box problem.

Couldn't you write a blogger hack for Google Image Relinker Mod? Example - couldn't you force blogger images to appear on a page in an image tag? Surely that's better than that darn pop up.

=======

About BBCode

[edit - It's not working- I think it's an add-on conflict - never mind...]

 
thorbenhauer Script's Author

1:
See my comment
http://userscripts.org/scripts/show/29891#comme...

3+edit:
http://wiki.greasespot.net/DOMContentLoaded
Correct, because images don't fire the DOMContentLoaded event. It would be possible to offer such links with this script over Google image search, but I recommend using the BBCode Firefox extension instead
https://addons.mozilla.org/en-US/firefox/addon/128

 
ekbworldwide Scriptwright

_________________________
1
Blogspot/blogger isn't working - I just installed this script and "Blogspot Image Relinker".

_________________________
2
Thanks for the RefControl link - I tried another add-on to do the same thing and it was total junk. I should have checked this thread! RefControl is really nice.

_________________________
3
How about adding an option (via "User script commands"?) to put a ready to grab forum link under the image? Example



[img]http://www.groovygrooves.com/wp-content/themes/WP_Premium/images/rss.gif[img]

===

Edit

I just realized that #3 probably isn't possible since - as far as I know - greasemonkey can't/won't work on urls that are image urls.

 
thorbenhauer Script's Author

Concerning blogspot.com:
http://userscripts.org/scripts/show/29891

Hope it improves the situation.

Concerning images.google.tld/images (search view):
The script source contains a switch to exclude images from blogger.com from link rewriting. Just uncomment the if-clause marked in the code. It's disabled by default to allow the use of proxy workarounds.

EDIT: Deprecated! See http://userscripts.org/scripts/show/5059#commen...

Concerning images.google.tld/imgres (framed result view):
I've discarded the idea of manipulating the top frame. Mainly because it's possible, that the picture can't be found anymore on the bottom frame. So it's not a reliable source to fetch the right folder path.
In cases where it can be found, the Blogspot Image Relinker script is also involved and the link will be rewritten in the bottom frame.

 
thorbenhauer Script's Author

gutenberg.org relies on the referrer. Disabling the referrer in your browser will proof this. I'm using RefControl for such purposes. Either you can block all referrers or just block it for gutenberg.org.

If you don't want to use this extension you can fix this with Privoxy too. See http://www.privoxy.org/user-manual/actions-file...

Btw. I've implemented a test script for blogspot/blogger to relink the images. Seems to work. I'll throw it on the server over the day.

 
ekbworldwide Scriptwright

I was going to forget about Privoxy but then I decided I had to learn more about it. gutenberg.org often won't allow a direct link from google images.

a gutenberg.org image via http://tbn0.google.com/images?q=...

The direct link...
http://www.gutenberg.org/files/18757/18757-h/im...
.. if you click it - you'll (probably?) get this

One final question about Privoxy - can Privoxy stop that from happening? And make the direct link clickable?

site:gutenberg.org - Google Image Search
http://images.google.com/images?hl=en&q=site%3A...

 
thorbenhauer Script's Author

The filter works for me. After adding it to the user.action file, restarting Privoxy (not really necessary, but to be sure) and flushing the browser cache no download dialog appeared. I've tested many pictures, even from blogs, not only over the Google image search. This also doesn't interfere with my script. Of course if it's disabled you get the regular Google image search pages. But clicking on the top thumbnails in the framed result view, there is no download dialog.
Are you sure Privoxy is installed and configured correctly? What happens if you go to http://config.privoxy.org/show-status with Privoxy enabled?

For questions about Privoxy use the mailing list
https://lists.sourceforge.net/lists/listinfo/ij...
I think there is no official support forum.

About your script ideas:
It's worth a try. I'm not sure about the part in the framed result view, but for the blogs it should be possible. I'll give you an update soon.

 
ekbworldwide Scriptwright

How about having your script to stop a dialog box from opening for blogger images?

google image stuff

If an image has a link location of...

http://bp + number .blogger.com/ + blahblah + .jpg
http://bp + number .blogger.com/ + blahblah + .gif
etc

... do not rewrite the link and open the blogger image in a frame.

At the top of the frame rewrite the link location of the thumbnail. The link location and the image location have the same beginning and the same ending. The script could search the blogger page, grab the image link, add a "-h" and fix the link location. If you click the thumbnail - you get the image's page.

This solution isn't perfect but it's workable - isn't it?

===================================
I'll be working on this second idea - I have a feeling you could write a script to do it about 100X faster.

blogger page stuff

On blogger pages - (all?) the location links for clickable images could be rewritten.

A location link could become the image link with "-h" added.

I may be wrong - but image links seem to be kosher and easily changed to point to the image's page simply by adding "-h".

 
ekbworldwide Scriptwright

Thank you.

>> Fixing half of the links doesn't really improve the situation,
>> or do you think otherwise?

Fixing half is a bad idea.

>> A better way
>> A filter would look like this:
{ -filter +hide-content-disposition{block} } .blogger.com

I added that filter to the default.filter file - I just copied and pasted it into my filters. I know you wrote "would look like" but I don't know how long it will take me to figure out the Privoxy code to use. I learn coding things very slowly.

1
If I disable your script - the Privoxy filter "half" works at google images. It opens a page in a google image frame. But clicking on the top thumbnail or the image on the page - opens a dialog box.

2
If I use your script - the Privoxy filter doesn't work - and a dialog box is opened.

3
The filter doesn't work at blogger (see #1) if you click on an image.

example
Juan de la Cuerva: RUMBO A MARTE
http://juandelacuerva.blogspot.com/2007/11/rumb...

Clicking on the Mars photo - forces open a dialog box.

===

I spent about 10 minutes googling in vain for a Privoxy forum. Without a forum to ask questions - I don't think I can figure it out. Privoxy doesn't have a forum?

 
thorbenhauer Script's Author

It's a pita but there is no easy workaround on the greasemonkey side.

If you'll look up your google image search you'll find both types: images locations (containing /sxxx/) and link locations (containing /sxxx-R/) as you called them below.

In case of a image location you can add -h to the url. In the other case it's not that trivial:
see http://knownissues.blogspot.com/2007/11/clickin...

Without a XMLHTTPRequest it's not possible to get the right image location folder. And doing this for every picture will bloat network traffic and processing time.

Fixing half of the links doesn't really improve the situation, or do you think otherwise?

A better way of fixing this issue would be the use of a local proxy like Privoxy. You could filter the content-disposition HTTP response header and force your browser to render the image.

See http://www.privoxy.org/user-manual/actions-file...

A filter would look like this:


{ -filter +hide-content-disposition{block} }
.blogger.com

 
ekbworldwide Scriptwright

I just installed your script - blogger images force open a dialog box.

example

Juan de la Cuerva: RUMBO A MARTE
http://juandelacuerva.blogspot.com/2007/11/rumb...
I don't understand Spanish - the images are the important part.

Scroll down a little and you'll see this

link location - click it and a dialog box opens
http://bp3.blogger.com/_QcPSRUCyrgg/R1AKGyxu0NI...

image location - click it and a dialog box opens
http://bp3.blogger.com/_QcPSRUCyrgg/R1AKGyxu0NI...

If you add "-h" to the image location after s400 - its blogger image page will open
http://bp3.blogger.com/_QcPSRUCyrgg/R1AKGyxu0NI...

===

site:blogger.com - Google Image Search
http://images.google.com/images?q=site:blogger....

Clicking a blogger image forces open a dialog box.

===

Blogger images also break the direct links feature of the CustomizeGoogle add-on

link location - click it and a dialog box opens
http://bp3.blogger.com/_QcPSRUCyrgg/R1AKGyxu0NI...

image location - click it and a dialog box opens
http://bp3.blogger.com/_QcPSRUCyrgg/R1AKGyxu0NI...

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel