Yashwant Kumar Sahu
Yashwant Kumar Sahu

Reputation: 3386

Open popup.html using script in chrome extension?

Here I am working with chrome my menifest.json file like :

    {
  "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 work fine when I click default_icon on browser it will open popup page.

Now my concern is I want to open my popup page using script. "In background I want to write script which able to handle popup page"

thanks in advance..

Upvotes: 6

Views: 1646

Answers (3)

Wade
Wade

Reputation: 602

You can open popup.html in a new window or tab. While this isn't quite the functionality you are looking for it will have a similar effect. Especially if you format the new window similarly.

Upvotes: 1

serg
serg

Reputation: 111265

Sorry, but currently there is no way of opening it programmatically.

Upvotes: 3

neocotic
neocotic

Reputation: 2131

Have you tried using chrome.pageAction.show()? I've never had to use this before but I believe it's what you're looking for.

Upvotes: 0

Related Questions