From b76454b679003a98876a2ab34790527daeb3708b Mon Sep 17 00:00:00 2001 From: Alain Martin Date: Wed, 3 May 2023 22:00:35 +0200 Subject: [PATCH] Also replace alternate favicons (#141) * Fix favicon support in Chrome with Jenkins 2.367 and later Since https://github.com/jenkinsci/jenkins/pull/6768, there is an "alternate icon" element that needs to be removed as well. * Simplify --------- Co-authored-by: Tobias Gruetzmacher --- src/main/webapp/simple-theme.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/webapp/simple-theme.js b/src/main/webapp/simple-theme.js index 2163fbc..440ca5b 100644 --- a/src/main/webapp/simple-theme.js +++ b/src/main/webapp/simple-theme.js @@ -7,7 +7,7 @@ for (i = 0; i < links.length; i++) { link = links[i]; - if (link.rel === 'shortcut icon' || link.rel === 'icon') { + if (link.rel.split(/\s+/).some(e => e === 'icon')) { link.parentNode.removeChild(link); } }