Switch to duckduckgo favicon service

Switch to duckduckgo favicon service.
This commit is contained in:
narcolepticinsomniac 2020-05-02 02:33:59 -04:00
parent 7ab0651e4d
commit 2810e3d789
20 changed files with 24 additions and 24 deletions

View File

@ -347,7 +347,7 @@
"description": "Label for the checkbox that toggles grayed out mode of applies-to favicons in the new UI on manage page"
},
"manageFaviconsHelp": {
"message": "Разширението използва външна услуга https://www.google.com/s2/favicons",
"message": "Разширението използва външна услуга https://icons.duckduckgo.com/ip2/domain.ico",
"description": "Label for the checkbox that toggles applies-to favicons in the new UI on manage page"
},
"manageFilters": {

View File

@ -610,7 +610,7 @@
"description": "Label for the checkbox that toggles grayed out mode of applies-to favicons in the new UI on manage page"
},
"manageFaviconsHelp": {
"message": "Stylus používá externí službu https://www.google.com/s2/favicons",
"message": "Stylus používá externí službu https://icons.duckduckgo.com/ip2/domain.ico",
"description": "Label for the checkbox that toggles applies-to favicons in the new UI on manage page"
},
"manageFilters": {

View File

@ -626,7 +626,7 @@
"description": "Label for the checkbox that toggles grayed out mode of applies-to favicons in the new UI on manage page"
},
"manageFaviconsHelp": {
"message": "Stylus nutzt hierzu den externen Dienst https://www.google.com/s2/favicons",
"message": "Stylus nutzt hierzu den externen Dienst https://icons.duckduckgo.com/ip2/domain.ico",
"description": "Label for the checkbox that toggles applies-to favicons in the new UI on manage page"
},
"manageFilters": {

View File

@ -646,7 +646,7 @@
"description": "Label for the checkbox that toggles grayed out mode of applies-to favicons in the new UI on manage page"
},
"manageFaviconsHelp": {
"message": "Stylus uses an external service https://www.google.com/s2/favicons",
"message": "Stylus uses an external service https://icons.duckduckgo.com/ip2/domain.ico",
"description": "Label for the checkbox that toggles applies-to favicons in the new UI on manage page"
},
"manageFilters": {

View File

@ -622,7 +622,7 @@
"description": "Label for the checkbox that toggles grayed out mode of applies-to favicons in the new UI on manage page"
},
"manageFaviconsHelp": {
"message": "Stylus usa un servicio externo https://www.google.com/s2/favicons",
"message": "Stylus usa un servicio externo https://icons.duckduckgo.com/ip2/domain.ico",
"description": "Label for the checkbox that toggles applies-to favicons in the new UI on manage page"
},
"manageFilters": {

View File

@ -634,7 +634,7 @@
"description": "Label for the checkbox that toggles grayed out mode of applies-to favicons in the new UI on manage page"
},
"manageFaviconsHelp": {
"message": "Stylus kasutab välist teenust https://www.google.com/s2/favicons",
"message": "Stylus kasutab välist teenust https://icons.duckduckgo.com/ip2/domain.ico",
"description": "Label for the checkbox that toggles applies-to favicons in the new UI on manage page"
},
"manageFilters": {

View File

@ -630,7 +630,7 @@
"description": "Label for the checkbox that toggles grayed out mode of applies-to favicons in the new UI on manage page"
},
"manageFaviconsHelp": {
"message": "Stylus utilise le service externe https://www.google.com/s2/favicons",
"message": "Stylus utilise le service externe https://icons.duckduckgo.com/ip2/domain.ico",
"description": "Label for the checkbox that toggles applies-to favicons in the new UI on manage page"
},
"manageFilters": {

View File

@ -638,7 +638,7 @@
"description": "Label for the checkbox that toggles grayed out mode of applies-to favicons in the new UI on manage page"
},
"manageFaviconsHelp": {
"message": "Stylus משתמש בשירות חיצוני https://www.google.com/s2/favicons",
"message": "Stylus משתמש בשירות חיצוני https://icons.duckduckgo.com/ip2/domain.ico",
"description": "Label for the checkbox that toggles applies-to favicons in the new UI on manage page"
},
"manageFilters": {

View File

@ -622,7 +622,7 @@
"description": "Label for the checkbox that toggles grayed out mode of applies-to favicons in the new UI on manage page"
},
"manageFaviconsHelp": {
"message": "A Stylus külső szolgáltatást használ (https://www.google.com/s2/favicons)",
"message": "A Stylus külső szolgáltatást használ (https://icons.duckduckgo.com/ip2/domain.ico)",
"description": "Label for the checkbox that toggles applies-to favicons in the new UI on manage page"
},
"manageFilters": {

View File

@ -528,7 +528,7 @@
"description": "The label of live-reload feature"
},
"manageFaviconsHelp": {
"message": "Stylus utilizza un servizio esterno https://www.google.com/s2/favicons",
"message": "Stylus utilizza un servizio esterno https://icons.duckduckgo.com/ip2/domain.ico",
"description": "Label for the checkbox that toggles applies-to favicons in the new UI on manage page"
},
"manageFilters": {

View File

@ -642,7 +642,7 @@
"description": "Label for the checkbox that toggles grayed out mode of applies-to favicons in the new UI on manage page"
},
"manageFaviconsHelp": {
"message": "Stylusは外部サービスを使用します https://www.google.com/s2/favicons",
"message": "Stylusは外部サービスを使用します https://icons.duckduckgo.com/ip2/domain.ico",
"description": "Label for the checkbox that toggles applies-to favicons in the new UI on manage page"
},
"manageFilters": {

View File

@ -634,7 +634,7 @@
"description": "Label for the checkbox that toggles grayed out mode of applies-to favicons in the new UI on manage page"
},
"manageFaviconsHelp": {
"message": "Stylus gebruikt een externe dienst: https://www.google.com/s2/favicons",
"message": "Stylus gebruikt een externe dienst: https://icons.duckduckgo.com/ip2/domain.ico",
"description": "Label for the checkbox that toggles applies-to favicons in the new UI on manage page"
},
"manageHeading": {

View File

@ -646,7 +646,7 @@
"description": "Label for the checkbox that toggles grayed out mode of applies-to favicons in the new UI on manage page"
},
"manageFaviconsHelp": {
"message": "Stylus korzysta z usługi zewnętrznej https://www.google.com/s2/favicons",
"message": "Stylus korzysta z usługi zewnętrznej https://icons.duckduckgo.com/ip2/domain.ico",
"description": "Label for the checkbox that toggles applies-to favicons in the new UI on manage page"
},
"manageFilters": {

View File

@ -594,7 +594,7 @@
"description": "Label for the checkbox that toggles grayed out mode of applies-to favicons in the new UI on manage page"
},
"manageFaviconsHelp": {
"message": "O Stylus usa um serviço externo https://www.google.com/s2/favicons",
"message": "O Stylus usa um serviço externo https://icons.duckduckgo.com/ip2/domain.ico",
"description": "Label for the checkbox that toggles applies-to favicons in the new UI on manage page"
},
"manageFilters": {

View File

@ -542,7 +542,7 @@
"description": "Label for the checkbox that toggles grayed out mode of applies-to favicons in the new UI on manage page"
},
"manageFaviconsHelp": {
"message": "Stylus folosește un serviciu extern https://www.google.com/s2/favicons",
"message": "Stylus folosește un serviciu extern https://icons.duckduckgo.com/ip2/domain.ico",
"description": "Label for the checkbox that toggles applies-to favicons in the new UI on manage page"
},
"manageFilters": {

View File

@ -626,7 +626,7 @@
"description": "Label for the checkbox that toggles grayed out mode of applies-to favicons in the new UI on manage page"
},
"manageFaviconsHelp": {
"message": "Используется сторонний сервис https://www.google.com/s2/favicons",
"message": "Используется сторонний сервис https://icons.duckduckgo.com/ip2/domain.ico",
"description": "Label for the checkbox that toggles applies-to favicons in the new UI on manage page"
},
"manageFilters": {

View File

@ -606,7 +606,7 @@
"description": "Label for the checkbox that toggles grayed out mode of applies-to favicons in the new UI on manage page"
},
"manageFaviconsHelp": {
"message": "Stylus använder en extern tjänst https://www.google.com/s2/favicons",
"message": "Stylus använder en extern tjänst https://icons.duckduckgo.com/ip2/domain.ico",
"description": "Label for the checkbox that toggles applies-to favicons in the new UI on manage page"
},
"manageFilters": {

View File

@ -622,7 +622,7 @@
"description": "Label for the checkbox that toggles grayed out mode of applies-to favicons in the new UI on manage page"
},
"manageFaviconsHelp": {
"message": "Stylus 使用外部服务 https://www.google.com/s2/favicons 来获取图标",
"message": "Stylus 使用外部服务 https://icons.duckduckgo.com/ip2/domain.ico 来获取图标",
"description": "Label for the checkbox that toggles applies-to favicons in the new UI on manage page"
},
"manageFilters": {

View File

@ -646,7 +646,7 @@
"description": "Label for the checkbox that toggles grayed out mode of applies-to favicons in the new UI on manage page"
},
"manageFaviconsHelp": {
"message": "Stylus 使用外部服務 https://www.google.com/s2/favicons",
"message": "Stylus 使用外部服務 https://icons.duckduckgo.com/ip2/domain.ico",
"description": "Label for the checkbox that toggles applies-to favicons in the new UI on manage page"
},
"manageFilters": {

View File

@ -28,7 +28,7 @@ const newUI = {
newUI.renderClass();
const TARGET_TYPES = ['domains', 'urls', 'urlPrefixes', 'regexps'];
const GET_FAVICON_URL = 'https://www.google.com/s2/favicons?domain=';
const GET_FAVICON_URL = 'https://icons.duckduckgo.com/ip2/';
const OWN_ICON = chrome.runtime.getManifest().icons['16'];
const handleEvent = {};
@ -321,11 +321,11 @@ function getFaviconImgSrc(container = installed) {
const regexpMatchDomain = /^.*?:\/\/([^/]+)/;
for (const target of $$('.target', container)) {
const type = target.dataset.type;
const targetValue = target.textContent;
const targetValue = target.textContent.replace(/\*$/, '');;
if (!targetValue) continue;
let favicon = '';
if (type === 'domains') {
favicon = GET_FAVICON_URL + targetValue;
favicon = `${GET_FAVICON_URL}${targetValue}.ico`;
} else if (targetValue.includes('chrome-extension:') || targetValue.includes('moz-extension:')) {
favicon = OWN_ICON;
} else if (type === 'regexps') {
@ -333,10 +333,10 @@ function getFaviconImgSrc(container = installed) {
.replace(regexpRemoveNegativeLookAhead, '')
.replace(regexpReplaceExtraCharacters, '')
.match(regexpMatchRegExp);
favicon = favicon ? GET_FAVICON_URL + favicon.shift() : '';
favicon = favicon ? `${GET_FAVICON_URL}${favicon.shift()}.ico` : '';
} else {
favicon = targetValue.includes('://') && targetValue.match(regexpMatchDomain);
favicon = favicon ? GET_FAVICON_URL + favicon[1] : '';
favicon = favicon ? `${GET_FAVICON_URL}${favicon[1]}.ico` : '';
}
if (favicon) {
const img = target.children[0];