【问题标题】:How to make a chrome extension popup execute code on the current tab with a link?How to make a chrome extension popup execute code on the current tab with a link?
【发布时间】:2022-12-27 21:54:44
【问题描述】:

In my chrome extension (https://chrome.google.com/webstore/detail/dark-mode-shell-shockers/mbbolbckjdjlfpjahlbhcodgagdpcdnf?hl=en&authuser=0) I want to make it so that if they click the popup, they can toggle settings. Although I know how to code this, I cannot figure out how to make it run javascript on the current tab from the popup!

I tried to just run a function, but it only runs on the popup! I think there is a way to do this, but no tutorial is clear on how, they just kind of say that it is possible.

【问题讨论】:

    标签: google-chrome-extension popup popupmenu


    【解决方案1】:

    n my chrome extension (https://chrome.google.com/webstore/detail/dark-mode-shell-shockers/mbbolbckjdjlfpjahlbhcodgagdpcdnf?hl=en&authuser=0) I want to make it so that if they click the popup, they can toggle settings. Although I know how to code this, I cannot figure out how to make it run javascript on the current tab from the popup!

    I tried to just run a function, but it only runs on the popup! I think there is a way to do this, but no tutorial is clear on how, they just kind of say that it is possible.

    【讨论】:

      猜你喜欢
      • 2022-12-01
      • 2023-02-01
      • 2022-12-01
      • 2022-12-01
      • 2022-12-01
      • 2022-12-01
      • 2023-02-25
      • 2022-12-16
      • 2022-12-19
      相关资源
      最近更新 更多