| Index: lib/options.js |
| =================================================================== |
| --- a/lib/options.js |
| +++ b/lib/options.js |
| @@ -119,16 +119,27 @@ |
| browser.tabs.create({url: optionsUrl}, () => |
| { |
| returnShowOptionsCall(optionsTab, callback); |
| }); |
| } |
| }); |
| }; |
| +// On Firefox we set the popup programmatically here rather than via |
| +// manifest.json so we can open the options page directly on Android. |
| +if ("getPopup" in browser.browserAction) |
|
kzar
2017/11/04 16:17:26
The idea is that browser.browserAction.getPopup do
Wladimir Palant
2017/11/04 19:43:26
I think that the idea is rather introducing a dela
Manish Jethani
2017/11/05 11:35:00
The idea was that popup.html is set in manifest.js
Manish Jethani
2017/11/05 11:35:00
getPopup does exist on Firefox for Android v57, bu
kzar
2017/11/06 09:36:51
Right gotya.
|
| +{ |
| + browser.browserAction.getPopup({}).then(url => |
| + { |
| + if (!url && info.application != "fennec") |
|
Manish Jethani
2017/11/04 11:27:17
Note that we can't check for "fennec" in the initi
Wladimir Palant
2017/11/04 19:43:26
Can't we call getBrowserInfo explicitly here then?
kzar
2017/11/04 21:50:31
Oh yea, cool idea. By clearing the popup URL for F
Manish Jethani
2017/11/05 11:35:00
This does not work unfortunately due to a bug that
kzar
2017/11/06 09:36:51
Damn, that sucks. I guess we could at least get ri
Manish Jethani
2017/11/06 14:15:09
Done.
|
| + browser.browserAction.setPopup({popup: "popup.html"}); |
| + }); |
| +} |
| + |
| // On Firefox for Android, open the options page directly when the browser |
| // action is clicked. |
| browser.browserAction.onClicked.addListener(() => |
| { |
| browser.tabs.query({active: true, lastFocusedWindow: true}, ([tab]) => |
| { |
| let currentPage = new ext.Page(tab); |