adamschwartz / chrome-desaturate-favicons

Desaturate the favicons of all inactive tabs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

All inactive tabs show the default globe favicon

diogo-nogueira opened this issue · comments

When the browser hasn't had time to load the favicon it will use the default favicon (the globe icon) and when extension desaturates and replaces the favicon it will be cached by the browser making all tabs look like their favicons failed to load when inactive.

Can be easily replicated by deleting the "Favicons" cache file in "AppData\Local\Google\Chrome\User Data\Default".
Issue still happens without deleting the file.

Changed the "generateDataURLs" function call to be run on page load and with a 200 ms timeout to let the browser have enough time to load the correct website favicon and seems to be working in most cases.

addEventListener('load', ()=> {
  setTimeout(() => {
    generateDataURLs(faviconURL(window.location.href))
  }, 200)
})

Dont like using the timeout but it works