Index: ext/background.js |
=================================================================== |
--- a/ext/background.js |
+++ b/ext/background.js |
@@ -694,21 +694,24 @@ |
}, |
onChanged: chrome.storage.onChanged |
}; |
/* Options */ |
ext.showOptions = callback => |
{ |
+ let info = require("info"); |
+ |
if ("openOptionsPage" in chrome.runtime && |
- // Firefox for Android does have a runtime.openOptionsPage but it |
- // doesn't do anything. |
+ // Some versions of Firefox for Android before version 57 do have a |
+ // runtime.openOptionsPage but it doesn't do anything. |
// https://bugzilla.mozilla.org/show_bug.cgi?id=1364945 |
- require("info").application != "fennec") |
+ (info.application != "fennec" || |
+ parseInt(info.applicationVersion, 10) >= 57)) |
{ |
if (!callback) |
{ |
chrome.runtime.openOptionsPage(); |
} |
else |
{ |
chrome.runtime.openOptionsPage(() => |
@@ -727,17 +730,17 @@ |
} |
}); |
}); |
} |
} |
else |
{ |
// Edge does not yet support runtime.openOptionsPage (tested version 38) |
- // nor does Firefox for Android, |
+ // nor does Firefox for Android before version 57, |
// and so this workaround needs to stay for now. |
// We are not using extension.getURL to get the absolute path here |
// because of the Edge issue: |
// https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/10276332/ |
let open = win => |
{ |
let optionsUrl = "options.html"; |
let queryInfo = {url: optionsUrl}; |