开发者

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",
  "descriptio开发者_StackOverflow社区n": "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..


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


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜