google chrome background page suggestions/help
How can I use a background page, to highlight a certain keyword on a website, no matter 开发者_如何学Gothe website (google chrome extension)? No pop ups or anything, it just edits a keyword, on a site someone is viewing. I've seen it done before, I just can't figure out how! Thanks for any help.
The easiest way would be to use jQuery highlight plugin from a content script:
"content_scripts": [
{
"matches": ["http://*/*"],
"js": ["jquery.js", "jquery.highlight-3.js", "myscript.js"]
}
],
So you would include jquery, the plugin and your code that controls it into every page.
精彩评论