Fix Firefox's android icon (#1312)
This commit is contained in:
parent
1e5f118d2d
commit
598735fc7b
|
@ -11,8 +11,11 @@ const iconMan = (() => {
|
||||||
const staleBadges = new Set();
|
const staleBadges = new Set();
|
||||||
const imageDataCache = new Map();
|
const imageDataCache = new Map();
|
||||||
const badgeOvr = {color: '', text: ''};
|
const badgeOvr = {color: '', text: ''};
|
||||||
|
// https://github.com/openstyles/stylus/issues/1287 Fenix can't use custom ImageData
|
||||||
|
const FIREFOX_ANDROID = FIREFOX && navigator.userAgent.includes('Android');
|
||||||
|
|
||||||
// https://github.com/openstyles/stylus/issues/335
|
// https://github.com/openstyles/stylus/issues/335
|
||||||
let hasCanvas = loadImage(`/images/icon/${ICON_SIZES[0]}.png`)
|
let hasCanvas = FIREFOX_ANDROID ? false : loadImage(`/images/icon/${ICON_SIZES[0]}.png`)
|
||||||
.then(({data}) => (hasCanvas = data.some(b => b !== 255)));
|
.then(({data}) => (hasCanvas = data.some(b => b !== 255)));
|
||||||
|
|
||||||
addAPI(/** @namespace API */ {
|
addAPI(/** @namespace API */ {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user