Open pcepulionis opened 3 years ago
Thank you P. Cepulionis!
I love the extension Isaiah Billingsley has made as well and I've been waiting this feature for a long time but i don't have the knowledge to help like you did...
I hope he will implement it.
Blank default icons (or blurry ones) instead of the correct icons are annoying in Firefox. Especially if those webpage are some of the main ones you use with this extension. So I've looked into a code and I have an idea how to fix this problem with favicons provided as base64 images.
In
newtab.html
we addoptions_favicon_json
as one of the advanced options:in
newtab.js
we are appendingfavicon_json
option invar config
dict:in
newtab.js
we are modifyingfunction getIcon(node)
function to search for icons in dictionary first. If there is no defined domain, then extension is searching icon in selected provider:and after this, users can assign icon as base64 image based on domain:
The only missing part is
favicon_json
validation to avoid the error inJSON.parse
step. Also, I think my code could be better optimized because for the first time in my life I looked at JavaScript code and it was just a quick test.I hope this suggestion was helpful and I could add a verification step for
JSON.parse
step if you would like to implement it.Btw, I love your extension and have been using it for many years ❤️