Chrome plugin

Have a look. You can access the current tabs content with content.js. You will see I add a class to the body tag of the current tab. To inject code into the page, just add it to the js node in the manifest.json.