browser.runtime.getBrowserInfo was added in FF 51
This commit is contained in:
parent
f40c9f9a16
commit
a8769e375b
|
@ -18,8 +18,9 @@ if (!CHROME && !chrome.browserAction.openPopup) {
|
|||
// in FF pre-57 legacy addons can override useragent so we assume the worst
|
||||
// until we know for sure in the async getBrowserInfo()
|
||||
// (browserAction.openPopup was added in 57)
|
||||
FIREFOX = 50;
|
||||
browser.runtime.getBrowserInfo().then(info => {
|
||||
FIREFOX = browser.runtime.getBrowserInfo ? 51 : 50;
|
||||
// getBrowserInfo was added in FF 51
|
||||
Promise.resolve(FIREFOX >= 51 ? browser.runtime.getBrowserInfo() : {version: 50}).then(info => {
|
||||
FIREFOX = parseFloat(info.version);
|
||||
document.documentElement.classList.add('moz-appearance-bug', FIREFOX && FIREFOX < 54);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user