lapoozza
(Jewel Mahanta)
September 9, 2017, 7:42am
1
Is there any way that I can make it work?
Also what should I do if my extension needs to ask for additional permissions later on. It does not see to work on Android.
Is it possible to upload 2 version of the addon. One for mobile and more for desktop version of Firefox.
P.S. I tried on Firefox for Android 55.0.2
NilkasG
(Niklas Gollenstede)
September 9, 2017, 12:00pm
2
Is there any way that I can make it work?
More or less. This is what I do:
// browser_action (can not be set in manifest due to fennec incompatibility)
!fennec && browserAction.setIcon({ path: manifest.icons[1], });
!fennec && browserAction.setPopup({ popup: '/view.html#panel', });
fennec && browserAction.onClicked.addListener(async () =>
tabs.create({ url: `/view.html?forTab=${
(await tabs.query({ windowId, active: true, }))[0].id
}#panel`, })
);
Is it possible to upload 2 version of the addon. One for mobile and more for desktop version of Firefox.
I think it is, but with the above approach, you don’t need to.
Also what should I do if my extension needs to ask for additional permissions later on. It does not see to work on Android.
It should . Please elaborate.
1 Like
lapoozza
(Jewel Mahanta)
September 9, 2017, 12:18pm
3
Thanks for helping out.
Regarding the additional permissions, my extension cant seem to ask for additional permission in Android. In desktop this works without any issue. Here is a link to the addon: https://addons.mozilla.org/en-US/firefox/addon/9anime-companion
https://github.com/lap00zza/9anime-Companion/blob/master/src/ts/dashboard.ts#L197-L230
NilkasG
(Niklas Gollenstede)
September 10, 2017, 11:06am
4
Hm. I can’t see any obvious problems. Which API exactly are you using (browser
/chrome
, background page / visible extension page)? That shouldn’t but sometimes does make a difference if UI prompts are involved.
lapoozza
(Jewel Mahanta)
September 10, 2017, 4:28pm
5
I am using chrome and background_page. Also would it be okay if I talk to you via irc/pm.
NilkasG
(Niklas Gollenstede)
September 10, 2017, 9:38pm
6
There isn’t really much more I can tell you. I think it would be worth a shot to use the chrome
or browser
object of an open visible page.