Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/options.js

Issue 29788558: Noissue - Fixed browserAction in Firefox on Android (Closed)
Patch Set: Created May 23, 2018, 3:03 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | metadata.gecko » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/options.js
===================================================================
--- a/lib/options.js
+++ b/lib/options.js
@@ -185,11 +185,14 @@
// [1] - https://bugzilla.mozilla.org/show_bug.cgi?id=1414613
if ("getBrowserInfo" in browser.runtime)
{
- browser.runtime.getBrowserInfo().then(browserInfo =>
- {
- if (browserInfo.name == "Fennec")
- browser.browserAction.setPopup({popup: ""});
- });
+ Promise.all([browser.browserAction.getPopup({}),
+ browser.runtime.getBrowserInfo()]).then(
+ ([popup, browserInfo]) =>
+ {
+ if (!popup && browserInfo.name != "Fennec")
+ browser.browserAction.setPopup({popup: "popup.html"});
+ }
+ );
}
// On Firefox for Android, open the options page directly when the browser
« no previous file with comments | « no previous file | metadata.gecko » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld