From 1fce3cbc6bfd016ddee3c34a065d3d9b156f6491 Mon Sep 17 00:00:00 2001 From: Camille Barneaud <1693643+gadcam@users.noreply.github.com> Date: Wed, 27 Dec 2017 01:22:18 +0100 Subject: [PATCH] Enable the use of W in Firefox for Android (#1960) --- src/drivers/webextension/js/driver.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/drivers/webextension/js/driver.js b/src/drivers/webextension/js/driver.js index f3453aef5..d9c4234b7 100644 --- a/src/drivers/webextension/js/driver.js +++ b/src/drivers/webextension/js/driver.js @@ -244,10 +244,14 @@ wappalyzer.driver.displayApps = (detected, meta, context) => { icon = 'converted/' + icon.replace(/\.svg$/, '.png'); } - browser.pageAction.setIcon({ - tabId: tab.id, - path: '../images/icons/' + icon - }); + try { + browser.pageAction.setIcon({ + tabId: tab.id, + path: '../images/icons/' + icon + }); + } catch(e) { + // Firefox for Android does not support setIcon see https://bugzilla.mozilla.org/show_bug.cgi?id=1331746 + } found = true; }