Prevent using favicon masks

This commit is contained in:
M66B 2022-03-14 08:06:36 +01:00
parent ae373ac337
commit 94ab24379c
1 changed files with 5 additions and 3 deletions

View File

@ -785,13 +785,15 @@ public class ContactInfo {
boolean isIco = (href.endsWith(".ico") || "image/x-icon".equals(type));
boolean isSvg = (href.endsWith(".svg") || "image/svg+xml".equals(type));
boolean isMask = ("mask-icon".equals(rel) || img.hasAttr("mask"));
// Safari: "mask-icon"
// "apple-touch-startup-image"
if ("icon".equals(rel) && !isIco)
if (isMask)
order = -10; // Safari: "mask-icon"
else if ("icon".equals(rel) && !isIco)
order += 20;
else if ("apple-touch-icon".equals(rel) ||
"apple-touch-icon-precomposed".equals(rel)) {
// "apple-touch-startup-image"
if ("mailbox.org".equals(host))
order += 30;
else