Run script each time Chrome extension icon clicked

前端 未结 5 1206
有刺的猬
有刺的猬 2020-12-02 06:44

How do I write a chrome extension such that every time a user clicks the icon, my script is run but no popup is opened? (I would look this up in the docs myself but for wha

5条回答
  •  长情又很酷
    2020-12-02 06:56

    Instead of specifying a popup page, use the chrome.browserAction.onClicked API, documented here.

提交回复
热议问题