Reputation: 4185
I'm developing a chrome extension and I need to know when is google searching to perform an action on each search.
I've tried to listen the requests with chrome.webRequest but the cached requests aren't captured.
Evernote extension searches in my notes each time I search in Google, even if the request is cached. How are they doing it or how to make something similar?
Upvotes: 3
Views: 131
Reputation: 11207
Here is a post on the subject http://isgeek.eu/google-chrome-extension-google-search
The trick is to use
document.addEventListener("DOMSubtreeModified", function(event){
to listen to each change on the google search page.
Upvotes: 1