yahoo Image Relinker

By thorbenhauer Last update Feb 8, 2008 — Installed 3,402 times.

Archived Comments (locked)

in
Subscribe to Archived Comments 12 posts, 5 voices



Jesse Andrews Admin

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

 
thorbenhauer Script's Author

It rewrites yahoo image search links to point straight to the pictures.

 
love prone User

sorry..But what this script do ?

 
thorbenhauer Script's Author

New version up and running. Hopefully without any problems. If so just leave another comment. I'll look into it.

 
Dan 1 User

This is no longer working as of a few days ago (today is 2007-11-01). Yahoo must have changed some code. Can we get an update?

 
thorbenhauer Script's Author

Thanks Nimit Maru!
You're right! I changed the mentioned line as you've advised.

 
Nimit Maru Scriptwright

Hey, sorry for the late response, I didn't realize you had asked me this question.

The reason the line I suggested works better is that it lets the browser itself do the URI decoding. There are usually more characters to decode than just the "/". For a sample query (this may be different if you try this too many days after I suggest this), try this query in Y! image search: "Coffee Mug Black $10.jpg". It should return just one image. Now try clicking on that img with your line in, and then with my line instead, and you'll see that it breaks with the line that you have.

Hope that helps, thanks!

 
thorbenhauer Script's Author

Hello Nimit! Thank you for your comments. Could you please explain why

link.href = "http://" + decodeURIComponent(decodeURIComponent(ymatch[1]));

works "a lot better"? Do you have some examples on which the code

link.href = "http://" + ymatch[1].replace( /%252F/g , "/");

doesn't work?

In addition, I've removed the question marks, thanks for the hint!

 
Nimit Maru Scriptwright

Oh yes, you also need to remove the "?" from the end of the urls, because yahoo inserts ylt link tracking on the image search urls.

 
Nimit Maru Scriptwright

Hey, thanks for the yahoo version of the script. Just wanted to let you know that this script works a lot better in the url decoding when the last line looks like this:

link.href = "http://" + decodeURIComponent(decodeURIComponent(ymatch[1]));

 
thorbenhauer Script's Author

:-)

 
Dan 1 User

Woohoo!!!! Nice!!!

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