Working at migrating my old Firefox extension to the up-to-date Webextension format. Earlier, I was able to get the URL of the active tab in the following way:
var URL = tabs.activeTab.url;
Now, it doesn't work. I saw some references for tabs.getCurrent() and tabs.Tab -> url, but didn't find a single example on how to use it. So how I can get the URL of the active Firefox tab and place it into a variable for further usage?
Thanks, Racoon
tabs.getCurrent()
only works in very limited circumstances. It very specifically states that this does not work in an actual background script. It will only work for scripts which are running in the background context from within a tab, which is relatively uncommon situation. – Aspergillus