X
Tap here to go to the mobile version of the site.

Support Forum

Get URL of a current tab using Firefox 57 in an addon

Posted

This is my manifest file: {

 "description": "Test",
 "permissions": ["tabs"],
 "manifest_version": 2,
 "name": "Test",
 "version": "1.0",
 "background": {
   "scripts": ["background.js"]
 },
    "applications": {
     "gecko": {
        "id": "test@test.com"
     }
  },
  
 "browser_action": {
   "default_icon": {
     "16": "icons/icon.png",
     "32": "icons/icon.png",

"48": "icons/icon.png"

   }
 }

}

For some reason, attempting to use browser.tabs.Tab won't work. It just returns "undefined". It seems that the tabs permission isn't being given to background.js for some reason.

This is my manifest file: { "description": "Test", "permissions": ["tabs"], "manifest_version": 2, "name": "Test", "version": "1.0", "background": { "scripts": ["background.js"] }, "applications": { "gecko": { "id": "test@test.com" } }, "browser_action": { "default_icon": { "16": "icons/icon.png", "32": "icons/icon.png", "48": "icons/icon.png" } } } For some reason, attempting to use browser.tabs.Tab won't work. It just returns "undefined". It seems that the tabs permission isn't being given to background.js for some reason.

Additional System Details

Application

  • User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0

More Information

jscher2000
  • Top 10 Contributor
8637 solutions 70648 answers

This support forum focuses on end user issues. Could I suggest taking your question over to the Add-ons forum:

https://discourse.mozilla-community.org/c/add-ons

This support forum focuses on end user issues. Could I suggest taking your question over to the Add-ons forum: https://discourse.mozilla-community.org/c/add-ons