diff --git a/manage/manage.js b/manage/manage.js index 414774aa..44ec144f 100644 --- a/manage/manage.js +++ b/manage/manage.js @@ -309,8 +309,8 @@ function recreateStyleTargets({styles, iconsOnly = false} = {}) { }); } -function getFaviconImgSrc() { - const targets = $$('.target', installed); +function getFaviconImgSrc(container = installed) { + const targets = $$('.target', container); const regexpRemoveNegativeLookAhead = /(\?!([^)]+\))|\(\?![\w(]+[^)]+[\w|)]+)/g; // replace extra characters & all but the first group entry "(abc|def|ghi)xyz" => abcxyz const regexpReplaceExtraCharacters = /[\\(]|((\|\w+)+\))/g; @@ -537,6 +537,9 @@ function handleUpdate(style, {reason, method} = {}) { animateElement(entry); requestAnimationFrame(() => scrollElementIntoView(entry)); } + if (newUI.enabled && newUI.favicons) { + getFaviconImgSrc(entry); + } function handleToggledOrCodeOnly() { const newStyleMeta = getStyleWithNoCode(style);