1

I tried to create a popup window in the extension that I pull through GreasyFork, but since there is only JS there, I can’t bring the window to the output. How can I create a popup window in js?

I tried to wrap it in a function and substitute it in my own execution conditions, but how to attach the rest? if they are not considered in js? enter image description here I also tried that, but it doesn't work either enter image description here

L.L_cos
  • 23
  • 2
  • This link might help you, the answer has been validated : [Pop-Up window in extension](https://stackoverflow.com/q/10340481/16067048) – dorianDevTech Jan 27 '22 at 09:13

2 Answers2

1

İf you want open a new window:

chrome.windows.create({
   url: 'popup.html',
   type: 'popup', width: 400, height: 400,
});

İf you want open with on new tab:

chrome.tabs.create({ url:"popup.html" });

But you must add "tabs" permission to use this method.

Ekin
  • 107
  • 1
  • 9
-1

You should handle this in the manifest file. read this

Hadi Zare
  • 19
  • 3