Use DuckDuckGo favicon service (#1073)

* Use DuckDuckGo favicon service

There are multiple ways of how favicon of a website can be published:
- Have a `favicon.ico` file under the website root
- Set through `<link rel="shortcut icon" href="..." />` tag
- Set through `<link rel="icon" href="..." />` tag, or
- Set through platform-specific tags like `<link rel="apple-touch-icon" href="..." />`

Current implementation only supports first option, which does not work in many cases.

Instead of implementing favicon fetching logic from scratch, favicon fetching services can be used.
There are multiple of them, e.g.:
- https://icons.duckduckgo.com/ip3/www.google.com.ico
- https://www.google.com/s2/favicons?domain=www.google.com

This change switched from fetching favicon from the original host to DuckDuckGo.

* Create UX for favicon download method preferences

* Add preferences for favicon download method

* Adjust preferences window location

Also, sort localized resources

Co-authored-by: Alex Rakov <alexander-rakov@users.noreply.github.com>
This commit is contained in:
Alex Rakov
2020-05-15 10:37:52 -07:00
committed by GitHub
parent 67eee29fdf
commit c4fe593e8f
8 changed files with 120 additions and 21 deletions

View File

@@ -382,6 +382,15 @@
/* The master key was changed by an external program! */
"EXTERN_CHANGE_OF_MASTERKEY" = "Master key was changed by another program";
/* Direct download */
"FAVICON_DOWNLOAD_METHOD_DIRECT" = "Direct download";
/* DuckDuckGo */
"FAVICON_DOWNLOAD_METHOD_DUCKDUCKGO" = "DuckDuckGo";
/* Google */
"FAVICON_DOWNLOAD_METHOD_GOOGLE" = "Google";
/* External file change strategy option: ask what to do */
"FILE_CHANGE_STRATEGY_ASK" = "Ask";
@@ -837,4 +846,3 @@
/* Yesterday */
"YESTERDAY" = "Yesterday";