use duckduckgo favicons
This commit is contained in:
parent
ea7c26ce71
commit
4c4a319b33
|
@ -258,7 +258,7 @@
|
|||
"message": "Сиви"
|
||||
},
|
||||
"manageFaviconsHelp": {
|
||||
"message": "Разширението използва външна услуга https://www.google.com/s2/favicons"
|
||||
"message": "Разширението използва външна услуга https://icons.duckduckgo.com"
|
||||
},
|
||||
"manageFilters": {
|
||||
"message": "Филтри"
|
||||
|
|
|
@ -470,7 +470,7 @@
|
|||
"message": "Zešednutí"
|
||||
},
|
||||
"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": {
|
||||
"message": "Filtry"
|
||||
|
@ -971,9 +971,6 @@
|
|||
"usercssReplaceTemplateConfirmation": {
|
||||
"message": "Nahradit výchozí šablonu pro nové Usercss styly aktuálním kódem?"
|
||||
},
|
||||
"usercssReplaceTemplateName": {
|
||||
"message": "Prázdné @name nahrazuje výchozí šablonu"
|
||||
},
|
||||
"usercssReplaceTemplateSectionBody": {
|
||||
"message": "Sem vložte kód…"
|
||||
},
|
||||
|
|
|
@ -533,7 +533,7 @@
|
|||
"message": "Ausgegraut"
|
||||
},
|
||||
"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": {
|
||||
"message": "Filter"
|
||||
|
@ -1394,9 +1394,6 @@
|
|||
"usercssReplaceTemplateConfirmation": {
|
||||
"message": "Ersetze das vorgegebene Template für neue UserCSS styles mit dem vorliegenden Code?"
|
||||
},
|
||||
"usercssReplaceTemplateName": {
|
||||
"message": "Ein leeres @name ersetzt das vorgegebene Template"
|
||||
},
|
||||
"usercssReplaceTemplateSectionBody": {
|
||||
"message": "Quelltext hier eingeben..."
|
||||
},
|
||||
|
|
|
@ -413,7 +413,7 @@
|
|||
"message": "Για αναίρεση μιας κατά λάθος επαναφοράς, πατήστε Ctrl-Z (ή Cmd-Z) στο πλαίσιο κειμένου"
|
||||
},
|
||||
"manageFaviconsHelp": {
|
||||
"message": "Το Stylus χρησιμοποιεί μία εξωτερική υπηρεσία https://www.google.com/s2/favicons"
|
||||
"message": "Το Stylus χρησιμοποιεί μία εξωτερική υπηρεσία https://icons.duckduckgo.com"
|
||||
},
|
||||
"manageFilters": {
|
||||
"message": "Φίλτρα"
|
||||
|
|
|
@ -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"
|
||||
},
|
||||
"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"
|
||||
},
|
||||
"manageFilters": {
|
||||
|
|
|
@ -523,7 +523,7 @@
|
|||
"message": "Atenuado"
|
||||
},
|
||||
"manageFaviconsHelp": {
|
||||
"message": "Stylus usa un servicio externo https://www.google.com/s2/favicons"
|
||||
"message": "Stylus usa un servicio externo https://icons.duckduckgo.com"
|
||||
},
|
||||
"manageFilters": {
|
||||
"message": "Filtros"
|
||||
|
@ -1355,9 +1355,6 @@
|
|||
"usercssReplaceTemplateConfirmation": {
|
||||
"message": "¿Reemplazar con el código actual la plantilla predeterminada para nuevos estilos UserCSS?"
|
||||
},
|
||||
"usercssReplaceTemplateName": {
|
||||
"message": "@name vacío reemplaza la plantilla predeterminada"
|
||||
},
|
||||
"usercssReplaceTemplateSectionBody": {
|
||||
"message": "Inserte el código aquí..."
|
||||
},
|
||||
|
|
|
@ -494,7 +494,7 @@
|
|||
"message": "Tee halliks"
|
||||
},
|
||||
"manageFaviconsHelp": {
|
||||
"message": "Stylus kasutab välist teenust https://www.google.com/s2/favicons"
|
||||
"message": "Stylus kasutab välist teenust https://icons.duckduckgo.com"
|
||||
},
|
||||
"manageFilters": {
|
||||
"message": "Filtrid"
|
||||
|
@ -1112,9 +1112,6 @@
|
|||
"usercssReplaceTemplateConfirmation": {
|
||||
"message": "Asendad vaikimisi malli uutes kasutajacss stiilides praeguse koodiga?"
|
||||
},
|
||||
"usercssReplaceTemplateName": {
|
||||
"message": "Tühi @name asendab vaikimisi malli"
|
||||
},
|
||||
"usercssReplaceTemplateSectionBody": {
|
||||
"message": "Sisesta kood siia..."
|
||||
},
|
||||
|
|
|
@ -537,7 +537,7 @@
|
|||
"message": "Grisés"
|
||||
},
|
||||
"manageFaviconsHelp": {
|
||||
"message": "Stylus utilise le service externe https://www.google.com/s2/favicons"
|
||||
"message": "Stylus utilise le service externe https://icons.duckduckgo.com"
|
||||
},
|
||||
"manageFilters": {
|
||||
"message": "Filtres"
|
||||
|
@ -1339,9 +1339,6 @@
|
|||
"usercssReplaceTemplateConfirmation": {
|
||||
"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": {
|
||||
"message": "Insérer le code ici..."
|
||||
},
|
||||
|
|
|
@ -494,7 +494,7 @@
|
|||
"message": "האפרת האייקונים"
|
||||
},
|
||||
"manageFaviconsHelp": {
|
||||
"message": "Stylus משתמש בשירות חיצוני https://www.google.com/s2/favicons"
|
||||
"message": "Stylus משתמש בשירות חיצוני https://icons.duckduckgo.com"
|
||||
},
|
||||
"manageFilters": {
|
||||
"message": "מסננים"
|
||||
|
|
|
@ -485,7 +485,7 @@
|
|||
"message": "Megjelenítés szürkítve"
|
||||
},
|
||||
"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": {
|
||||
"message": "Szűrők"
|
||||
|
@ -1207,9 +1207,6 @@
|
|||
"usercssReplaceTemplateConfirmation": {
|
||||
"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": {
|
||||
"message": "Írj kódot ide…"
|
||||
},
|
||||
|
|
|
@ -397,7 +397,7 @@
|
|||
"message": "Ricaricamento live"
|
||||
},
|
||||
"manageFaviconsHelp": {
|
||||
"message": "Stylus utilizza un servizio esterno https://www.google.com/s2/favicons"
|
||||
"message": "Stylus utilizza un servizio esterno https://icons.duckduckgo.com"
|
||||
},
|
||||
"manageFilters": {
|
||||
"message": "Filtri"
|
||||
|
|
|
@ -545,7 +545,7 @@
|
|||
"message": "ファビコンをグレー表示"
|
||||
},
|
||||
"manageFaviconsHelp": {
|
||||
"message": "Stylusは外部サービスを使用します https://www.google.com/s2/favicons"
|
||||
"message": "Stylusは外部サービスを使用します https://icons.duckduckgo.com"
|
||||
},
|
||||
"manageFilters": {
|
||||
"message": "フィルター"
|
||||
|
@ -1427,9 +1427,6 @@
|
|||
"usercssReplaceTemplateConfirmation": {
|
||||
"message": "現在のコードで、新しいUsercssスタイルのデフォルト・テンプレートを置き換えますか?"
|
||||
},
|
||||
"usercssReplaceTemplateName": {
|
||||
"message": "@name が指定されていません"
|
||||
},
|
||||
"usercssReplaceTemplateSectionBody": {
|
||||
"message": "ここにコードを挿入..."
|
||||
},
|
||||
|
|
|
@ -530,7 +530,7 @@
|
|||
"message": "회색으로 표시"
|
||||
},
|
||||
"manageFaviconsHelp": {
|
||||
"message": "Stylus는 https://www.google.com/s2/favicons 외부 서비스를 이용합니다"
|
||||
"message": "Stylus는 https://icons.duckduckgo.com 외부 서비스를 이용합니다"
|
||||
},
|
||||
"manageFilters": {
|
||||
"message": "필터"
|
||||
|
@ -1359,9 +1359,6 @@
|
|||
"usercssReplaceTemplateConfirmation": {
|
||||
"message": "현재 코드로 새 Usercss 스타일의 기본 템플릿을 대체하시겠습니까?"
|
||||
},
|
||||
"usercssReplaceTemplateName": {
|
||||
"message": "@name을 비우면 기본 템플릿이 대체됩니다."
|
||||
},
|
||||
"usercssReplaceTemplateSectionBody": {
|
||||
"message": "코드를 여기 입력하세요"
|
||||
},
|
||||
|
|
|
@ -555,7 +555,7 @@
|
|||
"message": "Niet beschikbaar"
|
||||
},
|
||||
"manageFaviconsHelp": {
|
||||
"message": "Stylus gebruikt een externe dienst: https://www.google.com/s2/favicons"
|
||||
"message": "Stylus gebruikt een externe dienst: https://icons.duckduckgo.com"
|
||||
},
|
||||
"manageHeading": {
|
||||
"message": "Geïnstalleerde stijlen"
|
||||
|
@ -1431,9 +1431,6 @@
|
|||
"usercssReplaceTemplateConfirmation": {
|
||||
"message": "Wilt u de standaardsjabloon voor nieuwe Usercss-stijlen vervangen door de huidige code?"
|
||||
},
|
||||
"usercssReplaceTemplateName": {
|
||||
"message": "Lege @name vervangt de standaardsjabloon"
|
||||
},
|
||||
"usercssReplaceTemplateSectionBody": {
|
||||
"message": "Voer hier code in..."
|
||||
},
|
||||
|
|
|
@ -580,7 +580,7 @@
|
|||
"message": "Wyszarzone"
|
||||
},
|
||||
"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": {
|
||||
"message": "Filtry"
|
||||
|
@ -1468,9 +1468,6 @@
|
|||
"usercssReplaceTemplateConfirmation": {
|
||||
"message": "Zastąpić domyślny szablon dla nowych stylów Usercss aktualnym kodem?"
|
||||
},
|
||||
"usercssReplaceTemplateName": {
|
||||
"message": "Puste @name zastępuje szablon domyślny"
|
||||
},
|
||||
"usercssReplaceTemplateSectionBody": {
|
||||
"message": "Wstaw kod tutaj..."
|
||||
},
|
||||
|
|
|
@ -805,9 +805,6 @@
|
|||
"usercssReplaceTemplateConfirmation": {
|
||||
"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": {
|
||||
"message": "Insira o código aqui..."
|
||||
},
|
||||
|
|
|
@ -449,7 +449,7 @@
|
|||
"message": "Acinzentado(s)"
|
||||
},
|
||||
"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": {
|
||||
"message": "Filtros"
|
||||
|
@ -902,9 +902,6 @@
|
|||
"usercssReplaceTemplateConfirmation": {
|
||||
"message": "Substituir o modelo predefinido para novos estilos de Usercss com o código atual?"
|
||||
},
|
||||
"usercssReplaceTemplateName": {
|
||||
"message": "@name vazio substitui o modelo predefinido"
|
||||
},
|
||||
"usercssReplaceTemplateSectionBody": {
|
||||
"message": "Insira o código aqui..."
|
||||
},
|
||||
|
|
|
@ -410,7 +410,7 @@
|
|||
"message": "Hașurat"
|
||||
},
|
||||
"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": {
|
||||
"message": "Filtre"
|
||||
|
@ -839,9 +839,6 @@
|
|||
"usercssReplaceTemplateConfirmation": {
|
||||
"message": "Înlocuiți tema de bază a formatului Usercss cu acest cod?"
|
||||
},
|
||||
"usercssReplaceTemplateName": {
|
||||
"message": "@name este gol și înlocuiețte valoarea de bază"
|
||||
},
|
||||
"usercssReplaceTemplateSectionBody": {
|
||||
"message": "Introduce cod aici..."
|
||||
},
|
||||
|
|
|
@ -583,7 +583,7 @@
|
|||
"message": "Обесцвечивать"
|
||||
},
|
||||
"manageFaviconsHelp": {
|
||||
"message": "Используется сторонний сервис https://www.google.com/s2/favicons"
|
||||
"message": "Используется сторонний сервис https://icons.duckduckgo.com"
|
||||
},
|
||||
"manageFilters": {
|
||||
"message": "Фильтры"
|
||||
|
@ -1471,9 +1471,6 @@
|
|||
"usercssReplaceTemplateConfirmation": {
|
||||
"message": "Заменить шаблон по умолчанию для нового стиля в формате Usercss текущим кодом?"
|
||||
},
|
||||
"usercssReplaceTemplateName": {
|
||||
"message": "Пустой @name заменяет шаблон по умолчанию"
|
||||
},
|
||||
"usercssReplaceTemplateSectionBody": {
|
||||
"message": "Место для CSS кода..."
|
||||
},
|
||||
|
|
|
@ -479,7 +479,7 @@
|
|||
"message": "Nedtonade"
|
||||
},
|
||||
"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": {
|
||||
"message": "Filter"
|
||||
|
@ -1191,9 +1191,6 @@
|
|||
"usercssReplaceTemplateConfirmation": {
|
||||
"message": "Ersätt standardmallen för nya Usercss-stilar med den aktuella koden?"
|
||||
},
|
||||
"usercssReplaceTemplateName": {
|
||||
"message": "Tom @name ersätter standardmallen"
|
||||
},
|
||||
"usercssReplaceTemplateSectionBody": {
|
||||
"message": "Lägg in kod här..."
|
||||
},
|
||||
|
|
|
@ -423,7 +423,7 @@
|
|||
"message": "Gri renkte"
|
||||
},
|
||||
"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": {
|
||||
"message": "Filtreler"
|
||||
|
@ -779,9 +779,6 @@
|
|||
"usercssReplaceTemplateConfirmation": {
|
||||
"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": {
|
||||
"message": "Kodu buraya ekle..."
|
||||
},
|
||||
|
|
|
@ -553,7 +553,7 @@
|
|||
"message": "显示为灰色图标"
|
||||
},
|
||||
"manageFaviconsHelp": {
|
||||
"message": "Stylus 使用外部服务 https://www.google.com/s2/favicons 来获取图标"
|
||||
"message": "Stylus 使用外部服务 https://icons.duckduckgo.com 来获取图标"
|
||||
},
|
||||
"manageFilters": {
|
||||
"message": "过滤器"
|
||||
|
@ -1335,9 +1335,6 @@
|
|||
"usercssReplaceTemplateConfirmation": {
|
||||
"message": "使用当前的 UserStyle 替换为新的UserCSS默认模板 ??"
|
||||
},
|
||||
"usercssReplaceTemplateName": {
|
||||
"message": "该赋值为空的保存可设置默认模板"
|
||||
},
|
||||
"usercssReplaceTemplateSectionBody": {
|
||||
"message": "在此插入代码..."
|
||||
},
|
||||
|
|
|
@ -580,7 +580,7 @@
|
|||
"message": "显示为灰色图标"
|
||||
},
|
||||
"manageFaviconsHelp": {
|
||||
"message": "Stylus 使用外部服务 https://www.google.com/s2/favicons 来获取图标"
|
||||
"message": "Stylus 使用外部服务 https://icons.duckduckgo.com 来获取图标"
|
||||
},
|
||||
"manageFilters": {
|
||||
"message": "过滤器"
|
||||
|
@ -1465,9 +1465,6 @@
|
|||
"usercssReplaceTemplateConfirmation": {
|
||||
"message": "使用当前 UserStyle 代码替换为新的默认模板吗 ?"
|
||||
},
|
||||
"usercssReplaceTemplateName": {
|
||||
"message": "@name 为空值 可设置新的默认模板"
|
||||
},
|
||||
"usercssReplaceTemplateSectionBody": {
|
||||
"message": "在此插入代码..."
|
||||
},
|
||||
|
|
|
@ -580,7 +580,7 @@
|
|||
"message": "灰階淡出"
|
||||
},
|
||||
"manageFaviconsHelp": {
|
||||
"message": "Stylus 使用外部服務 https://www.google.com/s2/favicons"
|
||||
"message": "Stylus 使用外部服務 https://icons.duckduckgo.com"
|
||||
},
|
||||
"manageFilters": {
|
||||
"message": "過濾器"
|
||||
|
@ -1465,9 +1465,6 @@
|
|||
"usercssReplaceTemplateConfirmation": {
|
||||
"message": "為新的 Usercss 樣式取代預設的範本為目前的程式碼?"
|
||||
},
|
||||
"usercssReplaceTemplateName": {
|
||||
"message": "清空 @name 取代目前範本"
|
||||
},
|
||||
"usercssReplaceTemplateSectionBody": {
|
||||
"message": "在此插入程式碼……"
|
||||
},
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
'use strict';
|
||||
|
||||
const regexpTester = (() => {
|
||||
const GET_FAVICON_URL = 'https://www.google.com/s2/favicons?domain=';
|
||||
const OWN_ICON = chrome.runtime.getManifest().icons['16'];
|
||||
const cachedRegexps = new Map();
|
||||
let currentRegexps = [];
|
||||
|
@ -93,7 +92,7 @@ const regexpTester = (() => {
|
|||
for (const [url, match] of urls.entries()) {
|
||||
const faviconUrl = url.startsWith(URLS.ownOrigin)
|
||||
? OWN_ICON
|
||||
: GET_FAVICON_URL + new URL(url).hostname;
|
||||
: URLS.favicon(new URL(url).hostname);
|
||||
const icon = $create('img', {src: faviconUrl});
|
||||
if (match.text.length === url.length) {
|
||||
full.push($create('a', {tabIndex: 0}, [
|
||||
|
|
|
@ -71,6 +71,8 @@ const URLS = {
|
|||
'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/
|
||||
// TODO: remove when "minimum_chrome_version": "61" or higher
|
||||
chromeProtectsNTP: CHROME >= 61,
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
|
||||
const ENTRY_ID_PREFIX_RAW = 'style-';
|
||||
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 AGES = [
|
||||
[24, 'h', t('dateAbbrHour', '\x01')],
|
||||
|
@ -203,7 +202,7 @@ function getFaviconSrc(container = installed) {
|
|||
if (!targetValue) continue;
|
||||
let favicon = '';
|
||||
if (type === 'domains') {
|
||||
favicon = GET_FAVICON_URL + targetValue;
|
||||
favicon = URLS.favicon(targetValue);
|
||||
} else if (targetValue.includes('chrome-extension:') || targetValue.includes('moz-extension:')) {
|
||||
favicon = OWN_ICON;
|
||||
} else if (type === 'regexps') {
|
||||
|
@ -211,10 +210,10 @@ function getFaviconSrc(container = installed) {
|
|||
.replace(regexpRemoveNegativeLookAhead, '')
|
||||
.replace(regexpReplaceExtraCharacters, '')
|
||||
.match(regexpMatchRegExp);
|
||||
favicon = favicon ? GET_FAVICON_URL + favicon.shift() : '';
|
||||
favicon = favicon ? URLS.favicon(favicon.shift()) : '';
|
||||
} else {
|
||||
favicon = targetValue.includes('://') && targetValue.match(regexpMatchDomain);
|
||||
favicon = favicon ? GET_FAVICON_URL + favicon[1] : '';
|
||||
favicon = favicon ? URLS.favicon(favicon[1]) : '';
|
||||
}
|
||||
if (favicon) {
|
||||
const img = target.children[0];
|
||||
|
|
Loading…
Reference in New Issue
Block a user