Skip to content

Commit

Permalink
Also replace alternate favicons (#141)
Browse files Browse the repository at this point in the history
* Fix favicon support in Chrome with Jenkins 2.367 and later

Since jenkinsci/jenkins#6768, there is an
"alternate icon" element that needs to be removed as well.

* Simplify

---------

Co-authored-by: Tobias Gruetzmacher <tobias-git@23.gs>
  • Loading branch information
ala-ableton and TobiX authored May 3, 2023
1 parent 066f094 commit b76454b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/webapp/simple-theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit b76454b

Please sign in to comment.