From d30b066fcf374cd12bf466aecd04b6e278f401d5 Mon Sep 17 00:00:00 2001 From: Luise Klein Date: Wed, 22 Nov 2017 16:38:59 +0100 Subject: [PATCH] use fallback if user agent is MS Edge --- tinycon.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tinycon.js b/tinycon.js index 0b77a73..a87e2b3 100644 --- a/tinycon.js +++ b/tinycon.js @@ -36,6 +36,7 @@ }()); var browser = { + edge: ua('edge'), ie: ua('trident'), chrome: ua('chrome'), webkit: ua('chrome') || ua('safari'), @@ -112,7 +113,7 @@ var drawFavicon = function(label, color) { // fallback to updating the browser title if unsupported - if (!getCanvas().getContext || browser.ie || browser.safari || options.fallback === 'force') { + if (!getCanvas().getContext || browser.ie || browser.edge || browser.safari || options.fallback === 'force') { return updateTitle(label); } @@ -152,7 +153,7 @@ var originalTitle = document.title; // Strip out the old label if there is one - if (originalTitle[0] === '(') { + if (originalTitle.charAt(0) === '(') { originalTitle = originalTitle.slice(originalTitle.indexOf(' ')); }