开发者

Google Chrome Extension -- Icon in browser content

开发者 https://www.devze.com 2023-02-06 22:03 出处:网络
If you have seen the extension for WO开发者_开发知识库T for chrome you will better understand what am trying to achieve. When we Google search we get links in return I am trying to put my extension ic

If you have seen the extension for WO开发者_开发知识库T for chrome you will better understand what am trying to achieve. When we Google search we get links in return I am trying to put my extension icon after each link like WOT extension has done. And want to handle the click event on that icon. Please suggest me how I can set that icon and what calls I need to make to handle those events.


You first need to use Content Scripts to manipulate the DOM. You want to manipulate the DOM so you can search for each search result.

After that, it is just basic JavaScript (as if you owned the Document), you can add children elements (such as your icon), and add listeners on your elements so you can click them.

0

精彩评论

暂无评论...
验证码 换一张
取 消