|
Script Summary:
View Picsearch links in CSS Popup on Mouseover |
this script has 1 topic, 2 posts |
This script has no reviews. |
Gasoline requested me if I could develop a Greasemonkey script similar to my first script for Picsearch.com. Initially I thought it should be fairly simple. So, I looked into Picsearch. I was wrong. The good thing with Google Image Search is that all the search results have the url of actual image and actual page as part of their href. So, you just have to parse the href and replace it with image url.
Picsearch on the other hand just points to some ID and when you click on the search results to go to next page, then only you see those urls. So, it became a 2-step process compared to one for Google. First, I had to load the actual href in an invisible Iframe and then read the document in that Iframe to look for the desired urls.
So, finally the script is ready. I even added [Origin Image | Origin Page] to it like CustomizeGoogle. And its also an indicator that the script has done its business and popups should appear now (helpful, since its slower compared to google version because of above mentioned reason). And I assume everybody is going to open images in new tabs(if at all) because if you open in the same tab and come back it will obviously reload all the Iframes and images again.
Update - 08/28/2007 - I came across an irritating problem with some of the search results. Some of the origin pages don't want them to be shown in frames in some other site. So, they use the following hack at the top of their pages to break out of frames.
if (window!= top) top.location.href=location.href
This was loading their pages in Picsearch results page when I was trying to load them in a IFrame, spoiling the whole thing. So, instead I am using Ajax now. I had thought of Ajax earlier too but gave it up thinking invisible IFrame should work the same way. But, I was wrong(again?). The new script is MUCH FASTER!!!





