Skip to content

Commit acc7167

Browse files
authored
Merge pull request #10 from JOHLC/copilot/fix-28651566-a681-40f4-aec2-4db9e072d77b
Fix favicon format prioritization for Android Home Assistant notifications
2 parents a717c8e + f7bb15c commit acc7167

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

package/popup.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,12 @@ async function getPageInfo(tabId, config) {
134134
func: () => {
135135
// Define format priorities for Android compatibility (lower number = higher priority)
136136
const formatPriority = {
137-
'png': 1,
138-
'jpg': 2,
139-
'jpeg': 2,
140-
'webp': 3,
141-
'ico': 4,
142-
'svg': 5, // SVG last as it may not be supported by all Android apps
137+
'png': 1, // PNG is best supported format for Android notifications
138+
'jpg': 2, // JPEG is well supported
139+
'jpeg': 2, // JPEG alternate extension
140+
'webp': 3, // WEBP is modern and well supported
141+
'ico': 4, // ICO is widely supported but often smaller
142+
'svg': 10, // SVG not supported by Android companion app notifications
143143
};
144144

145145
const links = document.getElementsByTagName('link');

package/utils.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,12 @@ function getFavicon() {
144144

145145
// Define format priorities for Android compatibility (lower number = higher priority)
146146
const formatPriority = {
147-
'png': 1,
148-
'jpg': 2,
149-
'jpeg': 2,
150-
'webp': 3,
151-
'ico': 4,
152-
'svg': 5, // SVG last as it may not be supported by all Android apps
147+
'png': 1, // PNG is best supported format for Android notifications
148+
'jpg': 2, // JPEG is well supported
149+
'jpeg': 2, // JPEG alternate extension
150+
'webp': 3, // WEBP is modern and well supported
151+
'ico': 4, // ICO is widely supported but often smaller
152+
'svg': 10, // SVG not supported by Android companion app notifications
153153
};
154154

155155
// Store candidates with their priority scores

0 commit comments

Comments
 (0)