use duckduckgo favicons

This commit is contained in:
tophf 2022-01-27 05:07:28 +03:00
parent ea7c26ce71
commit 4c4a319b33
27 changed files with 29 additions and 86 deletions

View File

@ -258,7 +258,7 @@
"message": "Сиви" "message": "Сиви"
}, },
"manageFaviconsHelp": { "manageFaviconsHelp": {
"message": "Разширението използва външна услуга https://www.google.com/s2/favicons" "message": "Разширението използва външна услуга https://icons.duckduckgo.com"
}, },
"manageFilters": { "manageFilters": {
"message": "Филтри" "message": "Филтри"

View File

@ -470,7 +470,7 @@
"message": "Zešednutí" "message": "Zešednutí"
}, },
"manageFaviconsHelp": { "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"
}, },
"manageFilters": { "manageFilters": {
"message": "Filtry" "message": "Filtry"
@ -971,9 +971,6 @@
"usercssReplaceTemplateConfirmation": { "usercssReplaceTemplateConfirmation": {
"message": "Nahradit výchozí šablonu pro nové Usercss styly aktuálním kódem?" "message": "Nahradit výchozí šablonu pro nové Usercss styly aktuálním kódem?"
}, },
"usercssReplaceTemplateName": {
"message": "Prázdné @name nahrazuje výchozí šablonu"
},
"usercssReplaceTemplateSectionBody": { "usercssReplaceTemplateSectionBody": {
"message": "Sem vložte kód…" "message": "Sem vložte kód…"
}, },

View File

@ -533,7 +533,7 @@
"message": "Ausgegraut" "message": "Ausgegraut"
}, },
"manageFaviconsHelp": { "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"
}, },
"manageFilters": { "manageFilters": {
"message": "Filter" "message": "Filter"
@ -1394,9 +1394,6 @@
"usercssReplaceTemplateConfirmation": { "usercssReplaceTemplateConfirmation": {
"message": "Ersetze das vorgegebene Template für neue UserCSS styles mit dem vorliegenden Code?" "message": "Ersetze das vorgegebene Template für neue UserCSS styles mit dem vorliegenden Code?"
}, },
"usercssReplaceTemplateName": {
"message": "Ein leeres @name ersetzt das vorgegebene Template"
},
"usercssReplaceTemplateSectionBody": { "usercssReplaceTemplateSectionBody": {
"message": "Quelltext hier eingeben..." "message": "Quelltext hier eingeben..."
}, },

View File

@ -413,7 +413,7 @@
"message": "Για αναίρεση μιας κατά λάθος επαναφοράς, πατήστε Ctrl-Z (ή Cmd-Z) στο πλαίσιο κειμένου" "message": "Για αναίρεση μιας κατά λάθος επαναφοράς, πατήστε Ctrl-Z (ή Cmd-Z) στο πλαίσιο κειμένου"
}, },
"manageFaviconsHelp": { "manageFaviconsHelp": {
"message": "Το Stylus χρησιμοποιεί μία εξωτερική υπηρεσία https://www.google.com/s2/favicons" "message": "Το Stylus χρησιμοποιεί μία εξωτερική υπηρεσία https://icons.duckduckgo.com"
}, },
"manageFilters": { "manageFilters": {
"message": "Φίλτρα" "message": "Φίλτρα"

View File

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

View File

@ -523,7 +523,7 @@
"message": "Atenuado" "message": "Atenuado"
}, },
"manageFaviconsHelp": { "manageFaviconsHelp": {
"message": "Stylus usa un servicio externo https://www.google.com/s2/favicons" "message": "Stylus usa un servicio externo https://icons.duckduckgo.com"
}, },
"manageFilters": { "manageFilters": {
"message": "Filtros" "message": "Filtros"
@ -1355,9 +1355,6 @@
"usercssReplaceTemplateConfirmation": { "usercssReplaceTemplateConfirmation": {
"message": "¿Reemplazar con el código actual la plantilla predeterminada para nuevos estilos UserCSS?" "message": "¿Reemplazar con el código actual la plantilla predeterminada para nuevos estilos UserCSS?"
}, },
"usercssReplaceTemplateName": {
"message": "@name vacío reemplaza la plantilla predeterminada"
},
"usercssReplaceTemplateSectionBody": { "usercssReplaceTemplateSectionBody": {
"message": "Inserte el código aquí..." "message": "Inserte el código aquí..."
}, },

View File

@ -494,7 +494,7 @@
"message": "Tee halliks" "message": "Tee halliks"
}, },
"manageFaviconsHelp": { "manageFaviconsHelp": {
"message": "Stylus kasutab välist teenust https://www.google.com/s2/favicons" "message": "Stylus kasutab välist teenust https://icons.duckduckgo.com"
}, },
"manageFilters": { "manageFilters": {
"message": "Filtrid" "message": "Filtrid"
@ -1112,9 +1112,6 @@
"usercssReplaceTemplateConfirmation": { "usercssReplaceTemplateConfirmation": {
"message": "Asendad vaikimisi malli uutes kasutajacss stiilides praeguse koodiga?" "message": "Asendad vaikimisi malli uutes kasutajacss stiilides praeguse koodiga?"
}, },
"usercssReplaceTemplateName": {
"message": "Tühi @name asendab vaikimisi malli"
},
"usercssReplaceTemplateSectionBody": { "usercssReplaceTemplateSectionBody": {
"message": "Sisesta kood siia..." "message": "Sisesta kood siia..."
}, },

View File

@ -537,7 +537,7 @@
"message": "Grisés" "message": "Grisés"
}, },
"manageFaviconsHelp": { "manageFaviconsHelp": {
"message": "Stylus utilise le service externe https://www.google.com/s2/favicons" "message": "Stylus utilise le service externe https://icons.duckduckgo.com"
}, },
"manageFilters": { "manageFilters": {
"message": "Filtres" "message": "Filtres"
@ -1339,9 +1339,6 @@
"usercssReplaceTemplateConfirmation": { "usercssReplaceTemplateConfirmation": {
"message": "Remplacer le modèle par défaut pour les nouveaux styles Usercss par le code actuel ?" "message": "Remplacer le modèle par défaut pour les nouveaux styles Usercss par le code actuel ?"
}, },
"usercssReplaceTemplateName": {
"message": "Un @name vide remplace le modèle par défaut"
},
"usercssReplaceTemplateSectionBody": { "usercssReplaceTemplateSectionBody": {
"message": "Insérer le code ici..." "message": "Insérer le code ici..."
}, },

View File

@ -494,7 +494,7 @@
"message": "האפרת האייקונים" "message": "האפרת האייקונים"
}, },
"manageFaviconsHelp": { "manageFaviconsHelp": {
"message": "Stylus משתמש בשירות חיצוני https://www.google.com/s2/favicons" "message": "Stylus משתמש בשירות חיצוני https://icons.duckduckgo.com"
}, },
"manageFilters": { "manageFilters": {
"message": "מסננים" "message": "מסננים"

View File

@ -485,7 +485,7 @@
"message": "Megjelenítés szürkítve" "message": "Megjelenítés szürkítve"
}, },
"manageFaviconsHelp": { "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)"
}, },
"manageFilters": { "manageFilters": {
"message": "Szűrők" "message": "Szűrők"
@ -1207,9 +1207,6 @@
"usercssReplaceTemplateConfirmation": { "usercssReplaceTemplateConfirmation": {
"message": "Le legyen cserélve az alapértelmezett sablon az új Usercss stílusokhoz a jelenlegi kóddal?" "message": "Le legyen cserélve az alapértelmezett sablon az új Usercss stílusokhoz a jelenlegi kóddal?"
}, },
"usercssReplaceTemplateName": {
"message": "Az üres @name lecseréli az alapértelmezett sablont"
},
"usercssReplaceTemplateSectionBody": { "usercssReplaceTemplateSectionBody": {
"message": "Írj kódot ide…" "message": "Írj kódot ide…"
}, },

View File

@ -397,7 +397,7 @@
"message": "Ricaricamento live" "message": "Ricaricamento live"
}, },
"manageFaviconsHelp": { "manageFaviconsHelp": {
"message": "Stylus utilizza un servizio esterno https://www.google.com/s2/favicons" "message": "Stylus utilizza un servizio esterno https://icons.duckduckgo.com"
}, },
"manageFilters": { "manageFilters": {
"message": "Filtri" "message": "Filtri"

View File

@ -545,7 +545,7 @@
"message": "ファビコンをグレー表示" "message": "ファビコンをグレー表示"
}, },
"manageFaviconsHelp": { "manageFaviconsHelp": {
"message": "Stylusは外部サービスを使用します https://www.google.com/s2/favicons" "message": "Stylusは外部サービスを使用します https://icons.duckduckgo.com"
}, },
"manageFilters": { "manageFilters": {
"message": "フィルター" "message": "フィルター"
@ -1427,9 +1427,6 @@
"usercssReplaceTemplateConfirmation": { "usercssReplaceTemplateConfirmation": {
"message": "現在のコードで、新しいUsercssスタイルのデフォルト・テンプレートを置き換えますか" "message": "現在のコードで、新しいUsercssスタイルのデフォルト・テンプレートを置き換えますか"
}, },
"usercssReplaceTemplateName": {
"message": "@name が指定されていません"
},
"usercssReplaceTemplateSectionBody": { "usercssReplaceTemplateSectionBody": {
"message": "ここにコードを挿入..." "message": "ここにコードを挿入..."
}, },

View File

@ -530,7 +530,7 @@
"message": "회색으로 표시" "message": "회색으로 표시"
}, },
"manageFaviconsHelp": { "manageFaviconsHelp": {
"message": "Stylus는 https://www.google.com/s2/favicons 외부 서비스를 이용합니다" "message": "Stylus는 https://icons.duckduckgo.com 외부 서비스를 이용합니다"
}, },
"manageFilters": { "manageFilters": {
"message": "필터" "message": "필터"
@ -1359,9 +1359,6 @@
"usercssReplaceTemplateConfirmation": { "usercssReplaceTemplateConfirmation": {
"message": "현재 코드로 새 Usercss 스타일의 기본 템플릿을 대체하시겠습니까?" "message": "현재 코드로 새 Usercss 스타일의 기본 템플릿을 대체하시겠습니까?"
}, },
"usercssReplaceTemplateName": {
"message": "@name을 비우면 기본 템플릿이 대체됩니다."
},
"usercssReplaceTemplateSectionBody": { "usercssReplaceTemplateSectionBody": {
"message": "코드를 여기 입력하세요" "message": "코드를 여기 입력하세요"
}, },

View File

@ -555,7 +555,7 @@
"message": "Niet beschikbaar" "message": "Niet beschikbaar"
}, },
"manageFaviconsHelp": { "manageFaviconsHelp": {
"message": "Stylus gebruikt een externe dienst: https://www.google.com/s2/favicons" "message": "Stylus gebruikt een externe dienst: https://icons.duckduckgo.com"
}, },
"manageHeading": { "manageHeading": {
"message": "Geïnstalleerde stijlen" "message": "Geïnstalleerde stijlen"
@ -1431,9 +1431,6 @@
"usercssReplaceTemplateConfirmation": { "usercssReplaceTemplateConfirmation": {
"message": "Wilt u de standaardsjabloon voor nieuwe Usercss-stijlen vervangen door de huidige code?" "message": "Wilt u de standaardsjabloon voor nieuwe Usercss-stijlen vervangen door de huidige code?"
}, },
"usercssReplaceTemplateName": {
"message": "Lege @name vervangt de standaardsjabloon"
},
"usercssReplaceTemplateSectionBody": { "usercssReplaceTemplateSectionBody": {
"message": "Voer hier code in..." "message": "Voer hier code in..."
}, },

View File

@ -580,7 +580,7 @@
"message": "Wyszarzone" "message": "Wyszarzone"
}, },
"manageFaviconsHelp": { "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"
}, },
"manageFilters": { "manageFilters": {
"message": "Filtry" "message": "Filtry"
@ -1468,9 +1468,6 @@
"usercssReplaceTemplateConfirmation": { "usercssReplaceTemplateConfirmation": {
"message": "Zastąpić domyślny szablon dla nowych stylów Usercss aktualnym kodem?" "message": "Zastąpić domyślny szablon dla nowych stylów Usercss aktualnym kodem?"
}, },
"usercssReplaceTemplateName": {
"message": "Puste @name zastępuje szablon domyślny"
},
"usercssReplaceTemplateSectionBody": { "usercssReplaceTemplateSectionBody": {
"message": "Wstaw kod tutaj..." "message": "Wstaw kod tutaj..."
}, },

View File

@ -805,9 +805,6 @@
"usercssReplaceTemplateConfirmation": { "usercssReplaceTemplateConfirmation": {
"message": "Substituir o template padrão por novos estilos com UserCSS com o código atual?" "message": "Substituir o template padrão por novos estilos com UserCSS com o código atual?"
}, },
"usercssReplaceTemplateName": {
"message": "@nome vazio substitui o template padrão"
},
"usercssReplaceTemplateSectionBody": { "usercssReplaceTemplateSectionBody": {
"message": "Insira o código aqui..." "message": "Insira o código aqui..."
}, },

View File

@ -449,7 +449,7 @@
"message": "Acinzentado(s)" "message": "Acinzentado(s)"
}, },
"manageFaviconsHelp": { "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"
}, },
"manageFilters": { "manageFilters": {
"message": "Filtros" "message": "Filtros"
@ -902,9 +902,6 @@
"usercssReplaceTemplateConfirmation": { "usercssReplaceTemplateConfirmation": {
"message": "Substituir o modelo predefinido para novos estilos de Usercss com o código atual?" "message": "Substituir o modelo predefinido para novos estilos de Usercss com o código atual?"
}, },
"usercssReplaceTemplateName": {
"message": "@name vazio substitui o modelo predefinido"
},
"usercssReplaceTemplateSectionBody": { "usercssReplaceTemplateSectionBody": {
"message": "Insira o código aqui..." "message": "Insira o código aqui..."
}, },

View File

@ -410,7 +410,7 @@
"message": "Hașurat" "message": "Hașurat"
}, },
"manageFaviconsHelp": { "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"
}, },
"manageFilters": { "manageFilters": {
"message": "Filtre" "message": "Filtre"
@ -839,9 +839,6 @@
"usercssReplaceTemplateConfirmation": { "usercssReplaceTemplateConfirmation": {
"message": "Înlocuiți tema de bază a formatului Usercss cu acest cod?" "message": "Înlocuiți tema de bază a formatului Usercss cu acest cod?"
}, },
"usercssReplaceTemplateName": {
"message": "@name este gol și înlocuiețte valoarea de bază"
},
"usercssReplaceTemplateSectionBody": { "usercssReplaceTemplateSectionBody": {
"message": "Introduce cod aici..." "message": "Introduce cod aici..."
}, },

View File

@ -583,7 +583,7 @@
"message": "Обесцвечивать" "message": "Обесцвечивать"
}, },
"manageFaviconsHelp": { "manageFaviconsHelp": {
"message": "Используется сторонний сервис https://www.google.com/s2/favicons" "message": "Используется сторонний сервис https://icons.duckduckgo.com"
}, },
"manageFilters": { "manageFilters": {
"message": "Фильтры" "message": "Фильтры"
@ -1471,9 +1471,6 @@
"usercssReplaceTemplateConfirmation": { "usercssReplaceTemplateConfirmation": {
"message": "Заменить шаблон по умолчанию для нового стиля в формате Usercss текущим кодом?" "message": "Заменить шаблон по умолчанию для нового стиля в формате Usercss текущим кодом?"
}, },
"usercssReplaceTemplateName": {
"message": "Пустой @name заменяет шаблон по умолчанию"
},
"usercssReplaceTemplateSectionBody": { "usercssReplaceTemplateSectionBody": {
"message": "Место для CSS кода..." "message": "Место для CSS кода..."
}, },

View File

@ -479,7 +479,7 @@
"message": "Nedtonade" "message": "Nedtonade"
}, },
"manageFaviconsHelp": { "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"
}, },
"manageFilters": { "manageFilters": {
"message": "Filter" "message": "Filter"
@ -1191,9 +1191,6 @@
"usercssReplaceTemplateConfirmation": { "usercssReplaceTemplateConfirmation": {
"message": "Ersätt standardmallen för nya Usercss-stilar med den aktuella koden?" "message": "Ersätt standardmallen för nya Usercss-stilar med den aktuella koden?"
}, },
"usercssReplaceTemplateName": {
"message": "Tom @name ersätter standardmallen"
},
"usercssReplaceTemplateSectionBody": { "usercssReplaceTemplateSectionBody": {
"message": "Lägg in kod här..." "message": "Lägg in kod här..."
}, },

View File

@ -423,7 +423,7 @@
"message": "Gri renkte" "message": "Gri renkte"
}, },
"manageFaviconsHelp": { "manageFaviconsHelp": {
"message": "Stylus harici bir servis kullanır https://www.google.com/s2/favicons" "message": "Stylus harici bir servis kullanır https://icons.duckduckgo.com"
}, },
"manageFilters": { "manageFilters": {
"message": "Filtreler" "message": "Filtreler"
@ -779,9 +779,6 @@
"usercssReplaceTemplateConfirmation": { "usercssReplaceTemplateConfirmation": {
"message": "Yeni Usercss stilleri için varsayılan şablonu geçerli kodla değiştir?" "message": "Yeni Usercss stilleri için varsayılan şablonu geçerli kodla değiştir?"
}, },
"usercssReplaceTemplateName": {
"message": "Boş @name, varsayılan şablonun yerini alır"
},
"usercssReplaceTemplateSectionBody": { "usercssReplaceTemplateSectionBody": {
"message": "Kodu buraya ekle..." "message": "Kodu buraya ekle..."
}, },

View File

@ -553,7 +553,7 @@
"message": "显示为灰色图标" "message": "显示为灰色图标"
}, },
"manageFaviconsHelp": { "manageFaviconsHelp": {
"message": "Stylus 使用外部服务 https://www.google.com/s2/favicons 来获取图标" "message": "Stylus 使用外部服务 https://icons.duckduckgo.com 来获取图标"
}, },
"manageFilters": { "manageFilters": {
"message": "过滤器" "message": "过滤器"
@ -1335,9 +1335,6 @@
"usercssReplaceTemplateConfirmation": { "usercssReplaceTemplateConfirmation": {
"message": "使用当前的 UserStyle 替换为新的UserCSS默认模板 ?" "message": "使用当前的 UserStyle 替换为新的UserCSS默认模板 ?"
}, },
"usercssReplaceTemplateName": {
"message": "该赋值为空的保存可设置默认模板"
},
"usercssReplaceTemplateSectionBody": { "usercssReplaceTemplateSectionBody": {
"message": "在此插入代码..." "message": "在此插入代码..."
}, },

View File

@ -580,7 +580,7 @@
"message": "显示为灰色图标" "message": "显示为灰色图标"
}, },
"manageFaviconsHelp": { "manageFaviconsHelp": {
"message": "Stylus 使用外部服务 https://www.google.com/s2/favicons 来获取图标" "message": "Stylus 使用外部服务 https://icons.duckduckgo.com 来获取图标"
}, },
"manageFilters": { "manageFilters": {
"message": "过滤器" "message": "过滤器"
@ -1465,9 +1465,6 @@
"usercssReplaceTemplateConfirmation": { "usercssReplaceTemplateConfirmation": {
"message": "使用当前 UserStyle 代码替换为新的默认模板吗 ?" "message": "使用当前 UserStyle 代码替换为新的默认模板吗 ?"
}, },
"usercssReplaceTemplateName": {
"message": "@name 为空值 可设置新的默认模板"
},
"usercssReplaceTemplateSectionBody": { "usercssReplaceTemplateSectionBody": {
"message": "在此插入代码..." "message": "在此插入代码..."
}, },

View File

@ -580,7 +580,7 @@
"message": "灰階淡出" "message": "灰階淡出"
}, },
"manageFaviconsHelp": { "manageFaviconsHelp": {
"message": "Stylus 使用外部服務 https://www.google.com/s2/favicons" "message": "Stylus 使用外部服務 https://icons.duckduckgo.com"
}, },
"manageFilters": { "manageFilters": {
"message": "過濾器" "message": "過濾器"
@ -1465,9 +1465,6 @@
"usercssReplaceTemplateConfirmation": { "usercssReplaceTemplateConfirmation": {
"message": "為新的 Usercss 樣式取代預設的範本為目前的程式碼?" "message": "為新的 Usercss 樣式取代預設的範本為目前的程式碼?"
}, },
"usercssReplaceTemplateName": {
"message": "清空 @name 取代目前範本"
},
"usercssReplaceTemplateSectionBody": { "usercssReplaceTemplateSectionBody": {
"message": "在此插入程式碼……" "message": "在此插入程式碼……"
}, },

View File

@ -5,7 +5,6 @@
'use strict'; 'use strict';
const regexpTester = (() => { const regexpTester = (() => {
const GET_FAVICON_URL = 'https://www.google.com/s2/favicons?domain=';
const OWN_ICON = chrome.runtime.getManifest().icons['16']; const OWN_ICON = chrome.runtime.getManifest().icons['16'];
const cachedRegexps = new Map(); const cachedRegexps = new Map();
let currentRegexps = []; let currentRegexps = [];
@ -93,7 +92,7 @@ const regexpTester = (() => {
for (const [url, match] of urls.entries()) { for (const [url, match] of urls.entries()) {
const faviconUrl = url.startsWith(URLS.ownOrigin) const faviconUrl = url.startsWith(URLS.ownOrigin)
? OWN_ICON ? OWN_ICON
: GET_FAVICON_URL + new URL(url).hostname; : URLS.favicon(new URL(url).hostname);
const icon = $create('img', {src: faviconUrl}); const icon = $create('img', {src: faviconUrl});
if (match.text.length === url.length) { if (match.text.length === url.length) {
full.push($create('a', {tabIndex: 0}, [ full.push($create('a', {tabIndex: 0}, [

View File

@ -71,6 +71,8 @@ const URLS = {
'about:newtab', 'about:newtab',
], ],
favicon: host => `https://icons.duckduckgo.com/ip3/${host}.ico`,
// Chrome 61.0.3161+ doesn't run content scripts on NTP https://crrev.com/2978953002/ // Chrome 61.0.3161+ doesn't run content scripts on NTP https://crrev.com/2978953002/
// TODO: remove when "minimum_chrome_version": "61" or higher // TODO: remove when "minimum_chrome_version": "61" or higher
chromeProtectsNTP: CHROME >= 61, chromeProtectsNTP: CHROME >= 61,

View File

@ -10,7 +10,6 @@
const ENTRY_ID_PREFIX_RAW = 'style-'; const ENTRY_ID_PREFIX_RAW = 'style-';
const TARGET_TYPES = ['domains', 'urls', 'urlPrefixes', 'regexps']; const TARGET_TYPES = ['domains', 'urls', 'urlPrefixes', 'regexps'];
const GET_FAVICON_URL = 'https://www.google.com/s2/favicons?domain=';
const OWN_ICON = chrome.runtime.getManifest().icons['16']; const OWN_ICON = chrome.runtime.getManifest().icons['16'];
const AGES = [ const AGES = [
[24, 'h', t('dateAbbrHour', '\x01')], [24, 'h', t('dateAbbrHour', '\x01')],
@ -203,7 +202,7 @@ function getFaviconSrc(container = installed) {
if (!targetValue) continue; if (!targetValue) continue;
let favicon = ''; let favicon = '';
if (type === 'domains') { if (type === 'domains') {
favicon = GET_FAVICON_URL + targetValue; favicon = URLS.favicon(targetValue);
} else if (targetValue.includes('chrome-extension:') || targetValue.includes('moz-extension:')) { } else if (targetValue.includes('chrome-extension:') || targetValue.includes('moz-extension:')) {
favicon = OWN_ICON; favicon = OWN_ICON;
} else if (type === 'regexps') { } else if (type === 'regexps') {
@ -211,10 +210,10 @@ function getFaviconSrc(container = installed) {
.replace(regexpRemoveNegativeLookAhead, '') .replace(regexpRemoveNegativeLookAhead, '')
.replace(regexpReplaceExtraCharacters, '') .replace(regexpReplaceExtraCharacters, '')
.match(regexpMatchRegExp); .match(regexpMatchRegExp);
favicon = favicon ? GET_FAVICON_URL + favicon.shift() : ''; favicon = favicon ? URLS.favicon(favicon.shift()) : '';
} else { } else {
favicon = targetValue.includes('://') && targetValue.match(regexpMatchDomain); favicon = targetValue.includes('://') && targetValue.match(regexpMatchDomain);
favicon = favicon ? GET_FAVICON_URL + favicon[1] : ''; favicon = favicon ? URLS.favicon(favicon[1]) : '';
} }
if (favicon) { if (favicon) {
const img = target.children[0]; const img = target.children[0];