From 598735fc7bae713413f52ef15b428907ba01c05d Mon Sep 17 00:00:00 2001 From: Gusted Date: Fri, 13 Aug 2021 07:28:50 +0200 Subject: [PATCH] Fix Firefox's android icon (#1312) --- background/icon-manager.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/background/icon-manager.js b/background/icon-manager.js index 798c2beb..ae255518 100644 --- a/background/icon-manager.js +++ b/background/icon-manager.js @@ -11,8 +11,11 @@ const iconMan = (() => { const staleBadges = new Set(); const imageDataCache = new Map(); 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 - 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))); addAPI(/** @namespace API */ {