How to keep Google Chrome Extension popup open?

前端 未结 7 1950
情话喂你
情话喂你 2020-11-27 21:15

If I open my extension popup then I open another window or tab following the popup does not stay open if I return to it.

Is there a way to force it so the popup stay

7条回答
  •  感情败类
    2020-11-27 22:10

    As others have said, this is a deliberate limitation of popup UI.

    Instead, you could inject some HTML into the page which loads the content you want in your popup into an element which hovers over the existing page. You will have to implement the close functionality yourself, but it will persist.

    Have a look at e.g. how keyframes.app has done it: https://github.com/mitchas/Keyframes.app/blob/master/Keyframes.app%20(Extension)/src/inject/ui.js

提交回复
热议问题