1

content.js: chrome.tabs.create({ url: 'http://www.sethjfreeman.com' });

manifest.json

{
    "manifest_version": 2,

    "name": "Secure Video Downloader",
    "description": "Download Videos Virus Free",
    "version": "1.0",
    "content_scripts": [
                         {
                             "matches": ["https://gostream.is/*", "http://gostream.is/*"],
                             "js": ["content.js", "jquery-3.2.1.min.js"],
                             "run_at": "document_end"
                         }
                  ],
    "browser_action": {
        "default_icon": "secure_16.png",
        "default_popup": "popup.html"
    },
    "permissions": [
        "tabs", "http://*/*"
    ]

}

Description:
When the page loads I get this error when trying to open a new tab

1 Answers1

0

You don't have access to chrome.tabs on an extenal injected site.

You need to pass a message to a background script and call chrome.tabs.create({ url: 'http://www.sethjfreeman.com' }); from there.

Check Message Passing.

anad
  • 58
  • 7