I am trying to make a small extension that checks google search results for Wikipedia articles, and adds a little extra link later. But I figured out the search results a bit. This is currently very simple.
manifest:
{ "name": "Test", "version": "0.1", "description": "Test Test", "icons":{ "128":"icon_128.png" }, "permissions": [ "tabs", "http://www.google.com/*", "https://www.google.com/*" ], "content_scripts": [ { "matches": ["http://www.google.com/*", "https://www.google.com/*"], "css": ["style.css"], "js": ["jquery-1.7.min.js", "injector.js"], "run_at": "document_end" } ], "manifest_version": 2 }
And the injector:
function findWikipediaLinks(){ console.log("here I am!"); console.log($('a'));
The problem is that the code here works before the actual search results are shown. (Results are logged as a in the google header. Is there a way to use this sentence in a timely manner?
source share