Skip to content

Commit e6ba32e

Browse files
authored
Merge pull request #1748 from getAlby/fix/alby-image
fix: remove scorer to simply get the first icon image
2 parents cb730c0 + 2c1ef3c commit e6ba32e

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/extension/content-script/originData.ts

-12
Original file line numberDiff line numberDiff line change
@@ -628,18 +628,6 @@ const metaDataRules: Record<string, RuleSet> = {
628628
(element) => element.getAttribute("href"),
629629
],
630630
],
631-
scorer: (element) => {
632-
const sizes = element.getAttribute("sizes");
633-
if (sizes) {
634-
const sizeMatches = sizes.match(/\d+/g);
635-
if (sizeMatches) {
636-
const parsed = parseInt(sizeMatches[0]);
637-
if (!isNaN(parsed)) {
638-
return parsed;
639-
}
640-
}
641-
}
642-
},
643631
processor: (iconUrl, context) =>
644632
context.options.forceImageHttps === true
645633
? makeUrlSecure(makeUrlAbsolute(context.url, iconUrl))

0 commit comments

Comments
 (0)