feat: add DuckDuckGo image proxy support for marketplace and photo pack images

- Implemented `getProxiedImageUrl` function to apply DuckDuckGo image proxy to image URLs based on user settings.
- Updated various components to use the proxied image URLs, including background loader, photo information, lightbox, and item cards.
- Added a new setting in the advanced options to enable/disable the DuckDuckGo image proxy.
- Updated localization files to include new strings for the image proxy feature.
- Initialized the proxy setting in default settings to false.
This commit is contained in:
alexsparkes
2026-01-31 16:54:55 +00:00
parent 41e438ead4
commit 7415b9cd5c
41 changed files with 125 additions and 7 deletions

View File

@@ -5,6 +5,7 @@ import { randomColourStyleBuilder } from './randomColour';
import videoCheck from './videoCheck';
import { getAllBackgrounds, getAllBackgroundsWithMetadata } from 'utils/customBackgroundDB';
import { BackgroundQueueManager } from 'utils/backgroundQueue';
import { getProxiedImageUrl } from 'utils/marketplace';
const parseJSON = (key, fallback = null) => {
const item = localStorage.getItem(key);
@@ -324,13 +325,14 @@ function getPhotoPackBackground(isOffline) {
const selected = photos[index];
photoData = {
url: selected.url.default,
url: getProxiedImageUrl(selected.url.default),
type: 'photo_pack',
photoInfo: {
hidden: false,
credit: selected.photographer,
location: selected.location,
blur_hash: selected.blur_hash || null,
url: selected.url.default,
},
};
}
@@ -378,13 +380,14 @@ async function prefetchPhotoPackImages(queueManager, allPhotos, currentPhoto, cu
// Normalize metadata
const normalized = selected.map((photo) => ({
url: photo.url.default,
url: getProxiedImageUrl(photo.url.default),
type: 'photo_pack',
photoInfo: {
hidden: false,
credit: photo.photographer,
location: photo.location,
blur_hash: photo.blur_hash || null,
url: photo.url.default,
},
}));

View File

@@ -16,6 +16,7 @@ import {
MdVisibilityOff as VisibilityOff,
} from 'react-icons/md';
import { Tooltip } from 'components/Elements';
import { getProxiedImageUrl } from 'utils/marketplace';
import Modal from 'react-modal';
import { ShareModal } from 'components/Elements';
@@ -46,7 +47,7 @@ const formatText = (text) => {
*/
const downloadImage = async (info) => {
const link = document.createElement('a');
link.href = await toDataURL(info.url);
link.href = await toDataURL(getProxiedImageUrl(info.url));
link.download = `mue-${formatText(info.credit)}-${formatText(info.location)}.jpg`; // image is more likely to be webp or avif btw
document.body.appendChild(link);
link.click();
@@ -98,7 +99,7 @@ function PhotoInformation({ info, url, api }) {
setWidth(event.target.width);
setHeight(event.target.height);
};
img.src = url;
img.src = getProxiedImageUrl(url);
// info is still there because we want the favourite button to work
if (localStorage.getItem('photoInformation') === 'false') {

View File

@@ -1,5 +1,6 @@
import { memo } from 'react';
import variables from 'config/variables';
import { getProxiedImageUrl } from 'utils/marketplace';
function Lightbox({ modalClose, img }) {
variables.stats.postEvent('modal', 'Opened lightbox');
@@ -9,7 +10,7 @@ function Lightbox({ modalClose, img }) {
<span className="closeModal" onClick={modalClose}>
&times;
</span>
<img src={img} className="lightboximg" draggable={false} alt="ItemPage screenshot" />
<img src={getProxiedImageUrl(img)} className="lightboximg" draggable={false} alt="ItemPage screenshot" />
</>
);
}

View File

@@ -9,6 +9,7 @@ import placeholderIcon from 'assets/icons/marketplace-placeholder.png';
import { Tooltip } from 'components/Elements';
import Dropdown from '../../../../components/Form/Settings/Dropdown/Dropdown';
import { getProxiedImageUrl } from 'utils/marketplace';
function filterItems(item, filter, categoryFilter) {
const lowerCaseFilter = filter.toLowerCase();
@@ -101,7 +102,7 @@ function ItemCard({ item, toggleFunction, type, onCollection, isCurator, isInsta
className="item-icon"
alt="icon"
draggable={false}
src={item.icon_url}
src={getProxiedImageUrl(item.icon_url)}
onError={(e) => {
e.target.onerror = null;
e.target.src = placeholderIcon;

View File

@@ -14,6 +14,7 @@ import {
import '../customwidgets.scss';
import { exportSettings, importSettings } from 'utils/settings';
import { clearBackgroundQueues } from 'utils/queueOperations';
import { FileUpload, Text, Switch, Dropdown } from 'components/Form/Settings';
import { ResetModal, Button } from 'components/Elements';
@@ -369,6 +370,26 @@ function AdvancedOptions({ currentSubSection, onSubSectionChange, sectionName })
</Action>
</Row>
<Row>
<Content
title={variables.getMessage('modals.main.settings.sections.advanced.marketplace_img_proxy')}
subtitle={variables.getMessage(
'modals.main.settings.sections.advanced.marketplace_img_proxy_subtitle',
)}
/>
<Action>
<Switch
name="marketplaceDDGProxy"
element=".other"
onChange={() => {
// Clear all prefetch queues when proxy setting changes
// so new images are fetched with correct proxy state
clearBackgroundQueues('all');
}}
/>
</Action>
</Row>
<Row>
<Content
title={variables.getMessage('modals.main.settings.sections.advanced.timezone.title')}

View File

@@ -448,6 +448,8 @@
"title": "متقدم",
"offline_mode": "وضع عدم الاتصال",
"offline_subtitle": "عند التفعيل، سيتم تعطيل جميع الطلبات إلى الخدمات عبر الإنترنت.",
"marketplace_img_proxy": "Use DuckDuckGo Image Proxy",
"marketplace_img_proxy_subtitle": "Proxy marketplace and photo pack images through DuckDuckGo for enhanced privacy. Useful if Imgur is blocked in your region.",
"data": "البيانات",
"data_description": "اختر تصدير إعدادات Mue إلى جهازك، استيراد ملف إعدادات موجود، أو إعادة تعيين الإعدادات إلى قيمها الافتراضية",
"data_subtitle": "إدارة بياناتك على Mue.",

View File

@@ -456,6 +456,8 @@
"title": "Advanced",
"offline_mode": "Offline mode",
"offline_subtitle": "When enabled, all requests to online services will be disabled.",
"marketplace_img_proxy": "Use DuckDuckGo Image Proxy",
"marketplace_img_proxy_subtitle": "Proxy marketplace and photo pack images through DuckDuckGo for enhanced privacy. Useful if Imgur is blocked in your region.",
"data": "Data",
"data_description": "Choose whether to export your Mue settings to your computer, import an existing settings file, or reset your settings to their default values",
"data_subtitle": "Manage your data on Mue.",

View File

@@ -448,6 +448,8 @@
"title": "Ətraflı",
"offline_mode": "Oflayn rejim",
"offline_subtitle": "Aktiv olduqda, bütün onlayn xidmətlərə sorğular dayandırılacaq.",
"marketplace_img_proxy": "Use DuckDuckGo Image Proxy",
"marketplace_img_proxy_subtitle": "Proxy marketplace and photo pack images through DuckDuckGo for enhanced privacy. Useful if Imgur is blocked in your region.",
"data": "Məlumat",
"data_description": "Mue parametrlərinizi kompüterinizə ixrac etməyi, mövcud bir parametrlər faylını idxal etməyi və ya parametrlərinizi varsayılan dəyərlərinə sıfırlamağı seçin",
"data_subtitle": "Mue-da məlumatlarınızı idarə edin.",

View File

@@ -448,6 +448,8 @@
"title": "Qabaqcıl",
"offline_mode": "Offline rejim",
"offline_subtitle": "Aktiv olduqda, bütün onlayn xidmətlərə sorğular deaktiv ediləcək.",
"marketplace_img_proxy": "Use DuckDuckGo Image Proxy",
"marketplace_img_proxy_subtitle": "Proxy marketplace and photo pack images through DuckDuckGo for enhanced privacy. Useful if Imgur is blocked in your region.",
"data": "Məlumat",
"data_description": "Mue parametrlərinizi kompüterinizə ixrac etməyi, mövcud bir parametrlər faylını idxal etməyi və ya parametrlərinizi defolt dəyərlərinə sıfırlamağı seçin",
"data_subtitle": "Mue-də məlumatlarınızı idarə edin.",

View File

@@ -448,6 +448,8 @@
"title": "উন্নত",
"offline_mode": "নীরব কার্যপদ্ধতি",
"offline_subtitle": "সক্রিয় করা হলে, অনলাইন পরিষেবাগুলির সমস্ত অনুরোধ অক্ষম করা হবে।",
"marketplace_img_proxy": "Use DuckDuckGo Image Proxy",
"marketplace_img_proxy_subtitle": "Proxy marketplace and photo pack images through DuckDuckGo for enhanced privacy. Useful if Imgur is blocked in your region.",
"data": "ডেটা",
"data_description": "Choose whether to export your Mue settings to your computer, import an existing settings file, or reset your settings to their default values",
"data_subtitle": "আপনার কম্পিউটারে আপনার Mue সেটিংস রপ্তানি করতে, একটি বিদ্যমান সেটিংস ফাইল আমদানি করতে বা আপনার সেটিংসকে তাদের ডিফল্ট মানগুলিতে পুনরায় সেট করতে চান তা চয়ন করুন",

View File

@@ -448,6 +448,8 @@
"title": "Erweitert",
"offline_mode": "Offline Modus",
"offline_subtitle": "Wenn diese Option aktiviert ist, werden alle Anfragen an Online-Dienste deaktiviert.",
"marketplace_img_proxy": "Use DuckDuckGo Image Proxy",
"marketplace_img_proxy_subtitle": "Proxy marketplace and photo pack images through DuckDuckGo for enhanced privacy. Useful if Imgur is blocked in your region.",
"data": "Daten",
"data_description": "Choose whether to export your Mue settings to your computer, import an existing settings file, or reset your settings to their default values",
"data_subtitle": "Wählen Sie, ob Sie Ihre Mue-Einstellungen auf Ihren Computer exportieren, eine vorhandene Einstellungsdatei importieren oder Ihre Einstellungen auf die Standardwerte zurücksetzen möchten",

View File

@@ -456,6 +456,8 @@
"title": "Advanced",
"offline_mode": "Offline mode",
"offline_subtitle": "When enabled, all requests to online services will be disabled.",
"marketplace_img_proxy": "Use DuckDuckGo Image Proxy",
"marketplace_img_proxy_subtitle": "Proxy marketplace and photo pack images through DuckDuckGo for enhanced privacy. Useful if Imgur is blocked in your region.",
"data": "Data",
"data_description": "Choose whether to export your Mue settings to your computer, import an existing settings file, or reset your settings to their default values",
"data_subtitle": "Manage your data on Mue.",

View File

@@ -448,6 +448,8 @@
"title": "Advanced",
"offline_mode": "Offline mode",
"offline_subtitle": "When enabled, all requests to online services will be disabled.",
"marketplace_img_proxy": "Use DuckDuckGo Image Proxy",
"marketplace_img_proxy_subtitle": "Proxy marketplace and photo pack images through DuckDuckGo for enhanced privacy. Useful if Imgur is blocked in your region.",
"data": "Data",
"data_description": "Choose whether to export your Mue settings to your computer, import an existing settings file, or reset your settings to their default values",
"data_subtitle": "Manage your data on Mue.",

View File

@@ -456,6 +456,8 @@
"title": "Advanced",
"offline_mode": "Offline mode",
"offline_subtitle": "When enabled, all requests to online services will be disabled.",
"marketplace_img_proxy": "Use DuckDuckGo Image Proxy",
"marketplace_img_proxy_subtitle": "Proxy marketplace and photo pack images through DuckDuckGo for enhanced privacy. Useful if Imgur is blocked in your region.",
"data": "Data",
"data_description": "Choose whether to export your Mue settings to your computer, import an existing settings file, or reset your settings to their default values",
"data_subtitle": "Choose whether to export your Mue settings to your computer, import an existing settings file, or reset your settings to their default values",

View File

@@ -448,6 +448,8 @@
"title": "Avanzado",
"offline_mode": "Modo sin conexión",
"offline_subtitle": "Cuando esté activada, se desactivarán todas las solicitudes a los servicios en línea.",
"marketplace_img_proxy": "Use DuckDuckGo Image Proxy",
"marketplace_img_proxy_subtitle": "Proxy marketplace and photo pack images through DuckDuckGo for enhanced privacy. Useful if Imgur is blocked in your region.",
"data": "Datos",
"data_description": "Choose whether to export your Mue settings to your computer, import an existing settings file, or reset your settings to their default values",
"data_subtitle": "Administra tus datos en Mue.",

View File

@@ -448,6 +448,8 @@
"title": "Avanzado",
"offline_mode": "Modo sin conexión",
"offline_subtitle": "When enabled, all requests to online services will be disabled.",
"marketplace_img_proxy": "Use DuckDuckGo Image Proxy",
"marketplace_img_proxy_subtitle": "Proxy marketplace and photo pack images through DuckDuckGo for enhanced privacy. Useful if Imgur is blocked in your region.",
"data": "Datos",
"data_description": "Choose whether to export your Mue settings to your computer, import an existing settings file, or reset your settings to their default values",
"data_subtitle": "Choose whether to export your Mue settings to your computer, import an existing settings file, or reset your settings to their default values",

View File

@@ -448,6 +448,8 @@
"title": "Täpsemad seaded",
"offline_mode": "Võrguühenduseta režiim",
"offline_subtitle": "Kui see on lubatud, keelatakse kõik päringud veebiteenustele.",
"marketplace_img_proxy": "Use DuckDuckGo Image Proxy",
"marketplace_img_proxy_subtitle": "Proxy marketplace and photo pack images through DuckDuckGo for enhanced privacy. Useful if Imgur is blocked in your region.",
"data": "Andmed",
"data_description": "Vali, kas eksportida oma Mue seaded arvutisse, importida olemasolev seadete fail või lähtestada seaded vaikeväärtustele",
"data_subtitle": "Halda oma andmeid Mues.",

View File

@@ -456,6 +456,8 @@
"title": "Advanced",
"offline_mode": "Offline mode",
"offline_subtitle": "When enabled, all requests to online services will be disabled.",
"marketplace_img_proxy": "Use DuckDuckGo Image Proxy",
"marketplace_img_proxy_subtitle": "Proxy marketplace and photo pack images through DuckDuckGo for enhanced privacy. Useful if Imgur is blocked in your region.",
"data": "Data",
"data_description": "Choose whether to export your Mue settings to your computer, import an existing settings file, or reset your settings to their default values",
"data_subtitle": "Manage your data on Mue.",

View File

@@ -448,6 +448,8 @@
"title": "Avancé",
"offline_mode": "Mode hors ligne",
"offline_subtitle": "Lorsqu'il est activé, toutes les requêtes vers les services en ligne seront désactivées.",
"marketplace_img_proxy": "Use DuckDuckGo Image Proxy",
"marketplace_img_proxy_subtitle": "Proxy marketplace and photo pack images through DuckDuckGo for enhanced privacy. Useful if Imgur is blocked in your region.",
"data": "Données",
"data_description": "Choisissez d'exporter vos paramètres Mue sur votre ordinateur, d'importer un fichier de paramètres existant ou de réinitialiser vos paramètres à leurs valeurs par défaut",
"data_subtitle": "Gérez vos données sur Mue.",

View File

@@ -456,6 +456,8 @@
"title": "Advanced",
"offline_mode": "Offline mode",
"offline_subtitle": "When enabled, all requests to online services will be disabled.",
"marketplace_img_proxy": "Use DuckDuckGo Image Proxy",
"marketplace_img_proxy_subtitle": "Proxy marketplace and photo pack images through DuckDuckGo for enhanced privacy. Useful if Imgur is blocked in your region.",
"data": "Data",
"data_description": "Choose whether to export your Mue settings to your computer, import an existing settings file, or reset your settings to their default values",
"data_subtitle": "Manage your data on Mue.",

View File

@@ -448,6 +448,8 @@
"title": "Lanjutan",
"offline_mode": "Mode Luring",
"offline_subtitle": "When enabled, all requests to online services will be disabled.",
"marketplace_img_proxy": "Use DuckDuckGo Image Proxy",
"marketplace_img_proxy_subtitle": "Proxy marketplace and photo pack images through DuckDuckGo for enhanced privacy. Useful if Imgur is blocked in your region.",
"data": "Data",
"data_description": "Choose whether to export your Mue settings to your computer, import an existing settings file, or reset your settings to their default values",
"data_subtitle": "Choose whether to export your Mue settings to your computer, import an existing settings file, or reset your settings to their default values",

View File

@@ -456,6 +456,8 @@
"title": "Advanced",
"offline_mode": "Offline mode",
"offline_subtitle": "When enabled, all requests to online services will be disabled.",
"marketplace_img_proxy": "Use DuckDuckGo Image Proxy",
"marketplace_img_proxy_subtitle": "Proxy marketplace and photo pack images through DuckDuckGo for enhanced privacy. Useful if Imgur is blocked in your region.",
"data": "Data",
"data_description": "Choose whether to export your Mue settings to your computer, import an existing settings file, or reset your settings to their default values",
"data_subtitle": "Manage your data on Mue.",

View File

@@ -448,6 +448,8 @@
"title": "Išplėstiniai",
"offline_mode": "Autonominis režimas",
"offline_subtitle": "Kai įjungta, visi prašymai į internetines paslaugas bus išjungti.",
"marketplace_img_proxy": "Use DuckDuckGo Image Proxy",
"marketplace_img_proxy_subtitle": "Proxy marketplace and photo pack images through DuckDuckGo for enhanced privacy. Useful if Imgur is blocked in your region.",
"data": "Duomenys",
"data_description": "Pasirinkite, ar eksportuoti Mue nustatymus į savo kompiuterį, importuoti esamą nustatymų failą, ar atstatyti nustatymus į numatytuosius",
"data_subtitle": "Tvarkykite savo duomenis Mue.",

View File

@@ -448,6 +448,8 @@
"title": "Papildu",
"offline_mode": "Bezsaistes režīms",
"offline_subtitle": "Kad iespējots, visi pieprasījumi tiešsaistes pakalpojumiem tiks atspējoti.",
"marketplace_img_proxy": "Use DuckDuckGo Image Proxy",
"marketplace_img_proxy_subtitle": "Proxy marketplace and photo pack images through DuckDuckGo for enhanced privacy. Useful if Imgur is blocked in your region.",
"data": "Dati",
"data_description": "Izvēlieties, vai eksportēt savus Mue iestatījumus uz datoru, importēt esošo iestatījumu failu vai atiestatīt iestatījumus uz noklusējuma vērtībām",
"data_subtitle": "Pārvaldiet savus datus Mue.",

View File

@@ -448,6 +448,8 @@
"title": "Advanced",
"offline_mode": "Offline-modus",
"offline_subtitle": "Indien ingeschakeld worden alle verzoeken naar online diensten uitgeschakeld.",
"marketplace_img_proxy": "Use DuckDuckGo Image Proxy",
"marketplace_img_proxy_subtitle": "Proxy marketplace and photo pack images through DuckDuckGo for enhanced privacy. Useful if Imgur is blocked in your region.",
"data": "Data",
"data_description": "Choose whether to export your Mue settings to your computer, import an existing settings file, or reset your settings to their default values",
"data_subtitle": "Kies of je jou Mue-instellingen naar je computer wilt exporteren, een bestaand instellingenbestand wilt importeren of je instellingen wilt terugzetten naar hun standaardwaarden",

View File

@@ -448,6 +448,8 @@
"title": "Advanced",
"offline_mode": "Frakoblet Modus",
"offline_subtitle": "When enabled, all requests to online services will be disabled.",
"marketplace_img_proxy": "Use DuckDuckGo Image Proxy",
"marketplace_img_proxy_subtitle": "Proxy marketplace and photo pack images through DuckDuckGo for enhanced privacy. Useful if Imgur is blocked in your region.",
"data": "Data",
"data_description": "Choose whether to export your Mue settings to your computer, import an existing settings file, or reset your settings to their default values",
"data_subtitle": "Choose whether to export your Mue settings to your computer, import an existing settings file, or reset your settings to their default values",

View File

@@ -456,6 +456,8 @@
"title": "Advanced",
"offline_mode": "Offline mode",
"offline_subtitle": "When enabled, all requests to online services will be disabled.",
"marketplace_img_proxy": "Use DuckDuckGo Image Proxy",
"marketplace_img_proxy_subtitle": "Proxy marketplace and photo pack images through DuckDuckGo for enhanced privacy. Useful if Imgur is blocked in your region.",
"data": "Data",
"data_description": "Choose whether to export your Mue settings to your computer, import an existing settings file, or reset your settings to their default values",
"data_subtitle": "Manage your data on Mue.",

View File

@@ -448,6 +448,8 @@
"title": "Avançado",
"offline_mode": "Modo offline",
"offline_subtitle": "Quando ativado, todos os pedidos de serviços online serão desativados.",
"marketplace_img_proxy": "Use DuckDuckGo Image Proxy",
"marketplace_img_proxy_subtitle": "Proxy marketplace and photo pack images through DuckDuckGo for enhanced privacy. Useful if Imgur is blocked in your region.",
"data": "Dados",
"data_description": "Choose whether to export your Mue settings to your computer, import an existing settings file, or reset your settings to their default values",
"data_subtitle": "Escolha se deseja exportar as suas configurações de Mue para o seu computador, importar um ficheiro de configurações existente ou redefinir as suas configurações para os valores padrão deles",

View File

@@ -448,6 +448,8 @@
"title": "Avançado",
"offline_mode": "Modo offline",
"offline_subtitle": "Quando ativado, todos os pedidos de serviços online serão desativados.",
"marketplace_img_proxy": "Use DuckDuckGo Image Proxy",
"marketplace_img_proxy_subtitle": "Proxy marketplace and photo pack images through DuckDuckGo for enhanced privacy. Useful if Imgur is blocked in your region.",
"data": "Dados",
"data_description": "Escolha se deseja exportar suas configurações do Mue para o computador, importar um arquivo de configurações existente ou redefinir suas configurações para os valores padrão",
"data_subtitle": "Gerencie seus dados no Mue.",

View File

@@ -448,6 +448,8 @@
"title": "Дополнительно",
"offline_mode": "Офлайн режим",
"offline_subtitle": "При включении все запросы к онлайн-сервисам будут отключены.",
"marketplace_img_proxy": "Use DuckDuckGo Image Proxy",
"marketplace_img_proxy_subtitle": "Proxy marketplace and photo pack images through DuckDuckGo for enhanced privacy. Useful if Imgur is blocked in your region.",
"data": "Data",
"data_description": "Choose whether to export your Mue settings to your computer, import an existing settings file, or reset your settings to their default values",
"data_subtitle": "Выберите, следует ли экспортировать настройки Mue на компьютер, импортировать существующий файл настроек или сбросить настройки до значений по умолчанию",

View File

@@ -448,6 +448,8 @@
"title": "Napredno",
"offline_mode": "Način brez povezave",
"offline_subtitle": "Ko je omogočen, bodo vse zahteve do spletnih storitev onemogočene.",
"marketplace_img_proxy": "Use DuckDuckGo Image Proxy",
"marketplace_img_proxy_subtitle": "Proxy marketplace and photo pack images through DuckDuckGo for enhanced privacy. Useful if Imgur is blocked in your region.",
"data": "Podatki",
"data_description": "Izberite, ali želite izvoziti nastavitve Mue na svoj računalnik, uvoziti obstoječo datoteko nastavitev ali ponastaviti nastavitve na privzete vrednosti",
"data_subtitle": "Upravljajte svoje podatke na Mue.",

View File

@@ -456,6 +456,8 @@
"title": "Advanced",
"offline_mode": "Offline mode",
"offline_subtitle": "When enabled, all requests to online services will be disabled.",
"marketplace_img_proxy": "Use DuckDuckGo Image Proxy",
"marketplace_img_proxy_subtitle": "Proxy marketplace and photo pack images through DuckDuckGo for enhanced privacy. Useful if Imgur is blocked in your region.",
"data": "Data",
"data_description": "Choose whether to export your Mue settings to your computer, import an existing settings file, or reset your settings to their default values",
"data_subtitle": "Manage your data on Mue.",

View File

@@ -448,6 +448,8 @@
"title": "மேம்பட்ட",
"offline_mode": "இணைப்பில்லாத பயன்முறை",
"offline_subtitle": "இயக்கப்பட்டால், நிகழ்நிலை சேவைகளுக்கான அனைத்து கோரிக்கைகளும் முடக்கப்படும்.",
"marketplace_img_proxy": "Use DuckDuckGo Image Proxy",
"marketplace_img_proxy_subtitle": "Proxy marketplace and photo pack images through DuckDuckGo for enhanced privacy. Useful if Imgur is blocked in your region.",
"data": "தகவல்கள்",
"data_description": "உங்கள் MUE அமைப்புகளை உங்கள் கணினியில் ஏற்றுமதி செய்யலாமா, ஏற்கனவே உள்ள அமைப்புகள் கோப்பை இறக்குமதி செய்யலாமா அல்லது உங்கள் அமைப்புகளை அவற்றின் இயல்புநிலை மதிப்புகளுக்கு மீட்டமைக்க வேண்டுமா என்பதைத் தேர்வுசெய்க",
"data_subtitle": "உங்கள் தரவை MUE இல் நிர்வகிக்கவும்.",

View File

@@ -448,6 +448,8 @@
"title": "Gelişmiş",
"offline_mode": "Çevrimdışı Mod",
"offline_subtitle": "Etkinleştirildiğinde, çevrimiçi hizmetlere yönelik tüm talepler devre dışı bırakılır.",
"marketplace_img_proxy": "Use DuckDuckGo Image Proxy",
"marketplace_img_proxy_subtitle": "Proxy marketplace and photo pack images through DuckDuckGo for enhanced privacy. Useful if Imgur is blocked in your region.",
"data": "Verileriniz",
"data_description": "Mue ayarlarınızı bilgisayarınıza aktarmayı, mevcut bir ayar dosyasını içe aktarmayı veya ayarlarınızı varsayılan değerlerine sıfırlamayı seçin.",
"data_subtitle": "Mue'daki verilerinizi yönetin.",

View File

@@ -448,6 +448,8 @@
"title": "Додатково",
"offline_mode": "Офлайн режим",
"offline_subtitle": "Якщо ввімкнено, всі запити до онлайн-сервісів будуть вимкнені.",
"marketplace_img_proxy": "Use DuckDuckGo Image Proxy",
"marketplace_img_proxy_subtitle": "Proxy marketplace and photo pack images through DuckDuckGo for enhanced privacy. Useful if Imgur is blocked in your region.",
"data": "Data",
"data_description": "Виберіть, чи потрібно експортувати налаштування Mue на комп'ютер, імпортувати існуючий файл налаштувань або скинути налаштування до значень за замовчуванням",
"data_subtitle": "Керуйте своїми даними на Mue.",

View File

@@ -456,6 +456,8 @@
"title": "Advanced",
"offline_mode": "Offline mode",
"offline_subtitle": "When enabled, all requests to online services will be disabled.",
"marketplace_img_proxy": "Use DuckDuckGo Image Proxy",
"marketplace_img_proxy_subtitle": "Proxy marketplace and photo pack images through DuckDuckGo for enhanced privacy. Useful if Imgur is blocked in your region.",
"data": "Data",
"data_description": "Choose whether to export your Mue settings to your computer, import an existing settings file, or reset your settings to their default values",
"data_subtitle": "Manage your data on Mue.",

View File

@@ -448,6 +448,8 @@
"title": "高级",
"offline_mode": "启用离线模式",
"offline_subtitle": "When enabled, all requests to online services will be disabled.",
"marketplace_img_proxy": "Use DuckDuckGo Image Proxy",
"marketplace_img_proxy_subtitle": "Proxy marketplace and photo pack images through DuckDuckGo for enhanced privacy. Useful if Imgur is blocked in your region.",
"data": "数据和设置",
"data_description": "Choose whether to export your Mue settings to your computer, import an existing settings file, or reset your settings to their default values",
"data_subtitle": "Choose whether to export your Mue settings to your computer, import an existing settings file, or reset your settings to their default values",

View File

@@ -456,6 +456,8 @@
"title": "Advanced",
"offline_mode": "Offline mode",
"offline_subtitle": "When enabled, all requests to online services will be disabled.",
"marketplace_img_proxy": "Use DuckDuckGo Image Proxy",
"marketplace_img_proxy_subtitle": "Proxy marketplace and photo pack images through DuckDuckGo for enhanced privacy. Useful if Imgur is blocked in your region.",
"data": "Data",
"data_description": "Choose whether to export your Mue settings to your computer, import an existing settings file, or reset your settings to their default values",
"data_subtitle": "Manage your data on Mue.",

View File

@@ -278,5 +278,9 @@
{
"name": "authorDetails",
"value": true
},
{
"name": "marketplaceDDGProxy",
"value": false
}
]

View File

@@ -0,0 +1,20 @@
/**
* Applies DuckDuckGo image proxy to a URL if the setting is enabled
* @param {string} url - The original image URL
* @returns {string} - The proxied URL or original URL
*/
export function getProxiedImageUrl(url) {
const useDDGProxy = localStorage.getItem('marketplaceDDGProxy') === 'true';
if (!useDDGProxy || !url) {
return url;
}
try {
const encodedUrl = encodeURIComponent(url);
return `https://proxy.duckduckgo.com/iu/?u=${encodedUrl}`;
} catch (error) {
console.warn('Failed to encode image URL for DDG proxy:', error);
return url;
}
}

View File

@@ -1,5 +1,6 @@
import { install } from './install';
import { uninstall } from './uninstall';
import { urlParser } from './urlParser';
import { getProxiedImageUrl } from './imageProxy';
export { install, uninstall, urlParser };
export { install, uninstall, urlParser, getProxiedImageUrl };