Get URL of a current tab using Firefox 57 in an addon
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.
All Replies (1)
This support forum focuses on end user issues. Could I suggest taking your question over to the Add-ons forum: