I am trying to figure out what is happening in javascript viewing a google live page.
Why not links that I add to the DOM with Javascript capability? (for a bit more context)
http://chesser.ca/2010/11/google-visual-image-search-hack-marklet/ for the "last demo"
If you do a google search, the results will appear on the page through a direct search. Then, if you hover one of the magnifying points in your result set, several things will happen.
- mousover event for magnifying glass arrows
- this calls an (as yet) unknown function with unknown parameters
- The function makes a cross-site call to the Google search results query server.
- these results are stored in the memory of the google VS class `google.vs .ha`
I copied the code from the google library and ran it through unminifier so that it is more readable. I also set breakpoints in the code through firebug so that I can check the dom and memory space before and after the page loads.
My ultimate goal is to be able to replicate the mousover event in the code, calling the mousover same function that is being called - but - I'm stuck in finding the right function. (I'm sure it includes google.vs.Ga(a, b, c) , but I'm not quite there yet.
I know this is almost the craziest obsession ever, but ... I don't know. Maybe if you also read the stack on Sunday, you understand :)
What function is called "On Hover" that sends a command to receive image requests?
EDIT: There are several advantages to this so far, and I thought I would add a bit more background for those who want to catch up with Firebug, you can follow what happens in javascript at any time.

Whether the image of what Google looks “in memory”, you can look at all the functions and calls and the current state of the variables.
You can also access these variables and call them by placing links in the bookmarks bar. like javascript:alert(google.base_href) after the search shows you the url you are at ... and from there it turned out more exciting.
EDIT NUMBER 2:
Many thanks to Matt, who managed to crack it in one go :)
<a href="javascript: (function(){ var all_divs = document.getElementsByTagName('div'); for (i=0;i < all_divs.length; i++) { if (all_divs[i].className == 'vsc') { google.vs.ea(all_divs[i]); } } })();">test all vsc</a>
javascript dom firebug reverse-engineering
Alex c
source share