chrome extension general point


You should do a content script, triggered by the specific pages.
Chrome injects automatically your content script in pages matching the pattern you indicate in manifest.json:
The content script lets you interact with the page's DOM, thus you can find the anchors ( tags). You may hang a listener from mouseover event, or you can just write the anchors title attribute (the text that popup when hoovering).
If your specific pages list isn't static (you want to modify the list without modifying the extension), then you may want to learn about programatic injection.
If you choose to hang a listener, use addListener, don't use the mouseover attribute, because your listener function isn't in the same world, it's on an isolated world.

评论

热门帖子