Archived Comments (locked)
|
|
The following is an archive of comments made before threaded discussions was implemented (November 16th, 2008) |
|
|
It rewrites yahoo image search links to point straight to the pictures. |
|
|
sorry..But what this script do ? |
|
|
New version up and running. Hopefully without any problems. If so just leave another comment. I'll look into it. |
|
|
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? |
|
|
Thanks Nimit Maru!
|
|
|
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! |
|
|
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! |
|
|
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. |
|
|
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])); |
|
|
:-) |
|
|
Woohoo!!!! Nice!!! |