Current (Firefox 54 and later)
Firefox 54, Firefox Android tabs
API. , , Firefox. , chrome.tabs.query()
browser.tabs.query()
. activeTab
/ tabs
permissions
manifest.json.
chrome.tabs.query
:
chrome.tabs.query({active:true,currentWindow:true},function(tabs){
var currentTabUrl = tabs[0].url;
});
browser.tabs.query
:
browser.tabs.query({active:true,currentWindow:true}).then(function(tabs){
var currentTabUrl = tabs[0].url;
});
Firefox 54
/
/, onClicked
. /, . , tabs.Tab
. - tabs.query
, , , Firefox Android.
API Firefox Android, . , webNavigation
, 0 URL- , script . webNavigation.onCommitted
webNavigation.onCompleted
. , , webNavigation
, , , webRequest
. , , , , , , .
URL ( ) script
URL- - , , webNavigation
URL-. , API tabs
, , URL- , / (, , tabs.Tab
), , script . URL- storage.onChanged
/popup script. background/popup API storage
- API tabs
(.. no tabs.sendMessage
).
/ onClicked
, Firefox Android, /. , onClicked
( tabs.Tab
URL-), -popup 1.
< > 1. - tabs
windows
API, Firefox Android. , webNavigation
URL- window.open()
, , - . , Firefox Android, , .