views:

43

answers:

1

Hi I'm writing a chrome extension to inject information into google search results. The only problem is that searching is now done through ajax instead of http. This means my code is only being executed once. This is a problem because my script needs to render on each new page. The only way to make it work is by refreshing the page manually (automatic refresh is possible? but ugly).

How can I alert my code to execute anytime google tries to search or fecth the next page of results?

A: 

You might need to hook in a javascript for the search button to make it call your code as well as the AJAX code to do the Google search. You would have to search the DOM for the button and change the onClick action. Remember to call the original action! :)

Stian Soiland-Reyes