Hello,
I’m trying to develop a webextention where I use tab.url of the current tab. That work last month when I began it, but now, no …
I have the right permission in the manifest, but in the tab I get, there is no URL or title :-/
and my code is on github : https://github.com/sizvix/Road-this
Can you be more specific? Which part of your code doesn’t work, and how should it work? What changed since it was working?
To use this add-on , on a page, you select a physical address ( for example , on https://www.mozilla.org/en-US/contact/spaces/paris/ , “16 Bis Boulevard Montmartre
Paris 75009
France” ) , click right “Road map > view on a map” , it open , for the moment, Bing with your address , that’s ok.
But click right (out of the map) and “Road map > parameters” , you have a page, and you have a list under “Addresses” ( maybe just one line if you view just one address ) .
On each lines you should have the title of the page where you find the address , and a link to the page ( and after the map and road ) … but there isn’t the title and the link is empty … (last month that wasn’t empty…)
In background.js , line 72 and line 83, I use addPoint with tab[0] in second parameter. In this function I should get and store the tab.title and tab.url on the line 60
This works in the beginning of october (on nightly), and now, there is no tab.title and no tab.url in the tab object …
I forget to remove the line 71, “console.log(tabs);” it open the console and display the tabs object tabs , and there two “problems” :
- tabs is not an array ( before it was an array , as you can see in the example https://github.com/mdn/webextensions-examples/blob/master/cookie-bg-picker/background_scripts/background.js , l.19, l.25, l.26 ) , ok, this isn’t a big problem for me
- tabs don’t have title and url attributes :-/ … that’s the problem …
I think error is on my code , because I succeed to use title in an example of mdn …
It could be on the permissions, but “tabs” is present …