Use first match for favicon target
This commit is contained in:
parent
be8c28053e
commit
e1ec441fa6
|
@ -256,7 +256,7 @@ function createStyleTargetsElement({entry, style, iconsOnly}) {
|
||||||
favicon = OWN_ICON;
|
favicon = OWN_ICON;
|
||||||
} else if (type === 'regexps') {
|
} else if (type === 'regexps') {
|
||||||
favicon = targetValue.match(/\w+[\\.(]+(com|org|co|net|im|io)\b/g);
|
favicon = targetValue.match(/\w+[\\.(]+(com|org|co|net|im|io)\b/g);
|
||||||
favicon = favicon ? GET_FAVICON_URL + favicon.pop().replace(/[\\(]/g, '') : '';
|
favicon = favicon ? GET_FAVICON_URL + favicon.shift().replace(/[\\(]/g, '') : '';
|
||||||
} else {
|
} else {
|
||||||
favicon = targetValue.includes('://') && targetValue.match(/^.*?:\/\/([^/]+)/);
|
favicon = targetValue.includes('://') && targetValue.match(/^.*?:\/\/([^/]+)/);
|
||||||
favicon = favicon ? GET_FAVICON_URL + favicon[1] : '';
|
favicon = favicon ? GET_FAVICON_URL + favicon[1] : '';
|
||||||
|
|
Loading…
Reference in New Issue
Block a user