Alex Gerber
Alex Gerber

Reputation: 1

google chrome background page suggestions/help

How can I use a background page, to highlight a certain keyword on a website, no matter the 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.

Upvotes: 0

Views: 72

Answers (1)

serg
serg

Reputation: 111255

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.

Upvotes: 2

Related Questions