Attempt to get favicon for RegExp match
This commit is contained in:
parent
8153a03c19
commit
be8c28053e
|
@ -252,9 +252,12 @@ function createStyleTargetsElement({entry, style, iconsOnly}) {
|
|||
let favicon = '';
|
||||
if (type === 'domains') {
|
||||
favicon = GET_FAVICON_URL + targetValue;
|
||||
} else if (targetValue.startsWith('chrome-extension:')) {
|
||||
} else if (targetValue.startsWith('chrome-extension:') || targetValue.startsWith('moz-extension:')) {
|
||||
favicon = OWN_ICON;
|
||||
} else if (type !== 'regexps') {
|
||||
} else if (type === 'regexps') {
|
||||
favicon = targetValue.match(/\w+[\\.(]+(com|org|co|net|im|io)\b/g);
|
||||
favicon = favicon ? GET_FAVICON_URL + favicon.pop().replace(/[\\(]/g, '') : '';
|
||||
} else {
|
||||
favicon = targetValue.includes('://') && targetValue.match(/^.*?:\/\/([^/]+)/);
|
||||
favicon = favicon ? GET_FAVICON_URL + favicon[1] : '';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user