Open popup.html with script in chrome extension?

Here I work with chrome my menifest.json file, for example:

{ "name": "chrome Demo", "version": "1.0", "description": "Official addon from chrome", "browser_action": { "default_icon": "star-on.png", "popup": "popupnew.html" }, "permissions": [ "tabs", "cookies", "http://*/*", "https://*/*", "contextMenus" ], "background_page": "background.html" } 

Here it works fine, when I click default_icon in the browser, it will open a popup.

Now I'm worried that I want to open my popup page using a script. "In the background, I want to write a script that can handle a popup

thanks in advance.

+6
source share
3 answers

Sorry, but there is currently no way to program it.

+3
source

You can open popup.html in a new window or tab. Although this is not exactly the functionality you are looking for, it will have a similar effect. Especially if you format a new window in the same way.

+1
source

Have you tried using chrome.pageAction.show () ? I have never had to use this before, but I believe in what you are looking for.

0
source

Source: https://habr.com/ru/post/894705/


All Articles