Use includes for chrome/moz extensions

This commit is contained in:
Rob Garrison 2017-12-31 01:11:03 -06:00
parent 59ebd30ec2
commit d278d26553

View File

@ -307,7 +307,7 @@ function getFaviconImgSrc() {
let favicon = ''; let favicon = '';
if (type === 'domains') { if (type === 'domains') {
favicon = GET_FAVICON_URL + targetValue; favicon = GET_FAVICON_URL + targetValue;
} else if (targetValue.startsWith('chrome-extension:') || targetValue.startsWith('moz-extension:')) { } else if (targetValue.includes('chrome-extension:') || targetValue.includes('moz-extension:')) {
favicon = OWN_ICON; favicon = OWN_ICON;
} else if (type === 'regexps') { } else if (type === 'regexps') {
favicon = targetValue.replace(regexpRemoveNegativeLookAhead, '').match(regexpMatchRegExp); favicon = targetValue.replace(regexpRemoveNegativeLookAhead, '').match(regexpMatchRegExp);