From 01d59192a3328ca98b9de93a4d1ec7441c8939a0 Mon Sep 17 00:00:00 2001 From: tophf Date: Mon, 17 Apr 2017 19:17:28 +0300 Subject: [PATCH] Chrome 49 fixup for updateIcon --- messaging.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/messaging.js b/messaging.js index a06d154c..94c058dd 100644 --- a/messaging.js +++ b/messaging.js @@ -28,6 +28,11 @@ let BG = chrome.extension.getBackgroundPage(); if (!BG || BG != window) { document.documentElement.classList.toggle('firefox', FIREFOX); document.documentElement.classList.toggle('opera', OPERA); + // TODO: remove once our manifest's minimum_chrome_version is 50+ + // Chrome 49 doesn't report own extension pages in webNavigation apparently + if (navigator.userAgent.includes('Chrome/49.')) { + getActiveTab().then(BG.updateIcon); + } } function notifyAllTabs(msg) {