Fix Firefox's android icon

- Resolves #1287
- Fenix currently doesn't seems to correctly use custom ImageData as icon. Thus disabling that feature for now is a plausible workaround.
This commit is contained in:
Gusted 2021-08-13 01:34:38 +02:00
parent 1e5f118d2d
commit 00a388de4c
No known key found for this signature in database
GPG Key ID: FD821B732837125F

View File

@ -11,8 +11,11 @@ const iconMan = (() => {
const staleBadges = new Set();
const imageDataCache = new Map();
const badgeOvr = {color: '', text: ''};
const FIREFOX_ANDROID = FIREFOX && navigator.userAgent.includes('Android');
// https://github.com/openstyles/stylus/issues/335
let hasCanvas = loadImage(`/images/icon/${ICON_SIZES[0]}.png`)
// https://github.com/openstyles/stylus/issues/1287
let hasCanvas = FIREFOX_ANDROID ? false : loadImage(`/images/icon/${ICON_SIZES[0]}.png`)
.then(({data}) => (hasCanvas = data.some(b => b !== 255)));
addAPI(/** @namespace API */ {