diff --git a/README.md b/README.md index 89cdc47..2c251b5 100644 --- a/README.md +++ b/README.md @@ -39,9 +39,11 @@ Privacy Redirect allows setting custom instances, instances can be found here: - [SearX](https://searx.github.io/searx/) - [DuckDuckGo](https://duckduckgo.com) - [Startpage](https://startpage.com) + - [Ecosia](https://www.ecosia.org) - [Qwant](https://www.qwant.com) - [Mojeek](https://www.mojeek.com) - [Presearch](https://www.presearch.org) + - [Whoogle](https://benbusby.com/projects/whoogle-search/) ## Development diff --git a/src/_locales/en/messages.json b/src/_locales/en/messages.json index 1dce07b..dd3c3a9 100644 --- a/src/_locales/en/messages.json +++ b/src/_locales/en/messages.json @@ -31,6 +31,10 @@ "message": "Search Engine Instance", "description": "Label for Search Engine instance field option (options)." }, + "simplyTranslateInstance": { + "message": "SimplyTranslate Instance", + "description": "Label for SimplyTranslate instance field option (options)." + }, "disableNitter": { "message": "Nitter Redirects", "description": "Label for enable/disable Nitter redirects option (options & pop-up)." @@ -55,6 +59,10 @@ "message": "Search Engine Redirects", "description": "Label for enable/disable Search Engine redirects option (options & pop-up)." }, + "disableSimplyTranslate": { + "message": "SimplyTranslate Redirects", + "description": "Label for enable/disable SimplyTranslate redirects option (options & pop-up)." + }, "alwaysProxy": { "message": "Always proxy videos through Invidious", "description": "Label for 'Always proxy videos through Invidious' option (options)." diff --git a/src/_locales/es/messages.json b/src/_locales/es/messages.json new file mode 100644 index 0000000..852c6ad --- /dev/null +++ b/src/_locales/es/messages.json @@ -0,0 +1,146 @@ +{ + "extensionName": { + "message": "Privacy Redirect", + "description": "Nombre de la extensión." + }, + "extensionDescription": { + "message": "Redirige las solicitudes de Twitter, Youtube, Instagram, Google Maps, Reddit y la Búsqueda de Google a alternativas que respetan su privacidad.", + "description": "Descripción de la extensión." + }, + "nitterInstance": { + "message": "Instancia de Nitter", + "description": "Etiqueta del campo para la instancia de Nitter (opciones)." + }, + "invidiousInstance": { + "message": "Instancia de Invidious", + "description": "Etiqueta del campo para la instancia de Invidious (opciones)." + }, + "bibliogramInstance": { + "message": "Instancia de Bibliogram", + "description": "Etiqueta del campo para la instancia de Bibliogram (opciones)." + }, + "osmInstance": { + "message": "Instancia de OpenStreetMap", + "description": "Etiqueta del campo para la instancia de OSM (opciones)." + }, + "redditInstance": { + "message": "Instancia de Reddit", + "description": "Etiqueta del campo para la instancia de Reddit (opciones)." + }, + "searchEngineInstance": { + "message": "Instancia de Buscador", + "description": "Etiqueta del campo para la instancia de Buscador (opciones)." + }, + "disableNitter": { + "message": "Redirecciones de Nitter", + "description": "Etiqueta para activar/desactivar la opción de redirecciones de Nitter (opciones y pop-up)." + }, + "disableInvidious": { + "message": "Redirecciones de Invidious", + "description": "Etiqueta para activar/desactivar la opción de redirecciones de Invidious (opciones y pop-up)." + }, + "disableBibliogram": { + "message": "Redirecciones de Bibliogram", + "description": "Etiqueta para activar/desactivar la opción de redirecciones de Bibliogram (opciones y pop-up)." + }, + "disableOsm": { + "message": "Redirecciones de OpenStreetMap", + "description": "Etiqueta para activar/desactivar la opción de redirecciones de OSM (opciones y pop-up)." + }, + "disableReddit": { + "message": "Redirecciones de Reddit", + "description": "Etiqueta para activar/desactivar la opción de redirecciones de Reddit (opciones y pop-up)." + }, + "disableSearchEngine": { + "message": "Redirecciones de Buscador", + "description": "Etiqueta para activar/desactivar la opción de redirecciones de Buscador (opciones y pop-up)." + }, + "alwaysProxy": { + "message": "Siempre usar el proxy de Invidious para videos", + "description": "Etiqueta para la opción de 'Siempre usar el proxy de Invidious para videos' (opciones)." + }, + "onlyEmbeddedVideo": { + "message": "Solo redirigir los videos incrustados a Invidious", + "description": "Etiqueta para la opción de 'Solo redirigir los videos incrustados a Invidious' (opciones)." + }, + "videoQuality": { + "message": "Calidad de Video de Invidious", + "description": "Etiqueta para la opción de 'Calidad de Video de Invidious' (opciones)." + }, + "removeTwitterSW": { + "message": "Eliminar proactivamente el service worker de Twitter", + "description": "Etiqueta para la opción de 'Eliminar proactivamente el service worker de Twitter' (opciones)." + }, + "invidiousDarkMode": { + "message": "Modo oscuro de Invidious siempre activo", + "description": "Etiqueta para la opción de 'Modo oscuro de Invidious siempre activo' (opciones)." + }, + "persistInvidiousPrefs": { + "message": "Preservar preferencias de Invidious (como cookie)", + "description": "Etiqueta para la opción de 'Preservar preferencias de Invidious (como cookie)' (opciones)." + }, + "generalTab": { + "message": "General", + "description": "Pestaña general (opciones)." + }, + "advancedTab": { + "message": "Avanzado", + "description": "Pestaña avanzado (opciones)." + }, + "exceptionsTab": { + "message": "Excepciones", + "description": "Pestaña de excepciones (opciones)." + }, + "exceptionsDescriptionP1": { + "message": "Ingrese la URL o la Expresión Regular a excluir de las redirecciones.", + "description": "Una descripción de la función 'Excepciones' párrafo 1 (opciones)." + }, + "exceptionsDescriptionP2": { + "message": "Todas las solicitudes para o provenientes de una URL que coincida con la excepción serán excluidas de las redirecciones.", + "description": "Una descripción de la función 'Excepciones' párrafo 2 (opciones)." + }, + "exceptionsDescriptionP3": { + "message": "Nota – Soporta expresiones regulares de JavaScript, excluyendo las barras oblicuas de cierre.", + "description": "Una descripción de la función 'Excepciones' párrafo 3 (opciones)." + }, + "addException": { + "message": "Agregar Excepción", + "description": "Botón de 'Agregar Excepción' (opciones)." + }, + "moreOptions": { + "message": "Más Opciones", + "description": "Botón de 'Más Opciones' (pop-up)." + }, + "privacy": { + "message": "Privacy", + "description": "Título de la extensión - Privacy (pop-up)." + }, + "redirect": { + "message": "Redirect", + "description": "Título de la extensión - Redirect (pop-up)." + }, + "version": { + "message": "Versión", + "description": "Versión" + }, + "useFreeTube": { + "message": "Usar FreeTube en vez de Invidious cuando sea posible", + "description": "Etiqueta para la opción de 'Usar FreeTube en vez de Invidious cuando sea posible' (opciones)." + }, + "nitterRandomPool": { + "message": "Grupo de instancias aleatorias de Nitter (separadas por coma)", + "description": "Etiqueta para la opción de 'Grupo de instancias aleatorias de Nitter (separadas por coma)' (opciones)." + }, + "invidiousRandomPool": { + "message": "Grupo de instancias aleatorias de Invidious (separadas por coma)", + "description": "Etiqueta para la opción de 'Grupo de instancias aleatorias de Invidious (separadas por coma)' (opciones)." + }, + "bibliogramRandomPool": { + "message": "Grupo de instancias aleatorias de Bibliogram (separadas por coma)", + "description": "Etiqueta para la opción de 'Grupo de instancias aleatorias de Bibliogram (separadas por coma)' (opciones)." + }, + "randomInstancePlaceholder": { + "message": "Instancia aleatoria (ninguna seleccionada)", + "description": "Entrada provisional en la configuración del proveedor de instancia que selecciona una instancia aleatoria del grupo cuando ninguna está seleccionada" + } +} diff --git a/src/_locales/es/store.md b/src/_locales/es/store.md new file mode 100644 index 0000000..8c198de --- /dev/null +++ b/src/_locales/es/store.md @@ -0,0 +1,33 @@ +# Extension Store (AMO & Chrome Web Store) Listing + +## Summary: + +``` +Una extensión web simple que redirige las solicitudes de Twitter, Youtube, Instagram, Google Maps, Reddit y la Búsqueda de Google a alternativas que respetan su privacidad. +``` + +## Description: + +``` +Redirige las solicitudes de Twitter, Youtube, Instagram, Google Maps, Reddit y la Búsqueda de Google a alternativas que respetan su privacidad. - Nitter, Invidious, Bibliogram, & OpenStreetMap. + +Permite ingresar instancias personalizadas, activar/desactivar todas las redirecciones y más. + +★ Más Información: ℹ️ + + +El código de esta extensión web está disponible en Github. + +★ Dona: 👨🏻‍💻 +Si te gusta esta extensión y tienes los recursos económicos, por favor considera comprarme un café ☕️ para mostrar tu aprecio y apoyo al desarrollo del proyecto. + +★ Permisos: ℹ️ + +``` diff --git a/src/assets/javascripts/helpers/google-search.js b/src/assets/javascripts/helpers/google-search.js index 3575f67..53f960d 100644 --- a/src/assets/javascripts/helpers/google-search.js +++ b/src/assets/javascripts/helpers/google-search.js @@ -2,6 +2,7 @@ const targets = /https?:\/\/(((www|maps)\.)?(google\.).*(\/search)|search\.(goog const redirects = [ { link: "https://duckduckgo.com", q: "/" }, { link: "https://startpage.com", q: "/search/" }, + { link: "https://www.ecosia.org", q: "/search" }, { link: "https://www.qwant.com", q: "/" }, { link: "https://www.mojeek.com", q: "/search" }, { link: "https://search.snopyta.org", q: "/" }, @@ -14,6 +15,9 @@ const redirects = [ { link: "https://engine.presearch.org", q: "/search" }, { link: "https://searx.silkky.cloud", q: "/" }, { link: "https://search.trom.tf", q: "/" }, + { link: "https://whoogle.sdf.org", q: "/search" }, + { link: "https://whoogle.himiko.cloud", q: "/search" }, + { link: "https://whoogle-search.zeet.app", q: "/search" }, ]; export default { diff --git a/src/assets/javascripts/helpers/google-translate.js b/src/assets/javascripts/helpers/google-translate.js new file mode 100644 index 0000000..e6f450d --- /dev/null +++ b/src/assets/javascripts/helpers/google-translate.js @@ -0,0 +1,12 @@ +const targets = [ + "translate.google.com" +]; + +const redirects = [ + "https://translate.metalune.xyz" +]; + +export default { + targets, + redirects, +} diff --git a/src/assets/javascripts/helpers/instagram.js b/src/assets/javascripts/helpers/instagram.js index ca03f10..1d86773 100644 --- a/src/assets/javascripts/helpers/instagram.js +++ b/src/assets/javascripts/helpers/instagram.js @@ -9,13 +9,11 @@ const redirects = [ "https://bibliogram.snopyta.org", "https://bibliogram.pussthecat.org", "https://bibliogram.nixnet.services", - "https://bg.endl.site", - "https://bibliogram.13ad.de", - "https://bibliogram.pixelfed.uno", "https://bibliogram.ethibox.fr", "https://bibliogram.hamster.dance", "https://bibliogram.kavin.rocks", "https://insta.trom.tf", + "https://bibliogram.hamster.dance" ]; const reservedPaths = [ "about", diff --git a/src/assets/javascripts/helpers/reddit.js b/src/assets/javascripts/helpers/reddit.js index 02055e0..dad6a06 100644 --- a/src/assets/javascripts/helpers/reddit.js +++ b/src/assets/javascripts/helpers/reddit.js @@ -12,6 +12,7 @@ const redirects = [ "https://libreddit.insanity.wtf", "https://libreddit.dothq.co", "https://libreddit.silkky.cloud", + "https://libreddit.himiko.cloud", // teddit: privacy w/ old UI "https://teddit.net", "https://teddit.ggc-project.de", diff --git a/src/assets/javascripts/helpers/youtube.js b/src/assets/javascripts/helpers/youtube.js index 76ef2dd..974b493 100644 --- a/src/assets/javascripts/helpers/youtube.js +++ b/src/assets/javascripts/helpers/youtube.js @@ -10,8 +10,8 @@ const targets = [ "music.youtube.com", ]; /* - Please remember to also update the manifest.json file - (content_scripts > matches, 'persist-invidious-prefs.js') + Please remember to also update the manifest.json file + (content_scripts > matches, 'persist-invidious-prefs.js') when updating this list: */ const redirects = [ @@ -33,6 +33,7 @@ const redirects = [ "https://invidious.tinfoil-hat.net", "https://invidious.namazso.eu", "https://vid.puffyan.us", + "https://dev.viewtube.io", "https://invidious.048596.xyz", "http://fz253lmuao3strwbfbmx46yu7acac2jz27iwtorgmbqlkurlclmancad.onion", "http://qklhadlycap4cnod.onion", diff --git a/src/manifest.json b/src/manifest.json index 0176ed7..30c1ada 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -58,6 +58,9 @@ "*://invidious.namazso.eu/*", "*://vid.puffyan.us/*", "*://invidious.048596.xyz/*", + "*://dev.viewtube.io/*", + "*://fz253lmuao3strwbfbmx46yu7acac2jz27iwtorgmbqlkurlclmancad.onion/*", + "*://invidious.048596.yxz/*", "*://fz253lmuao3strwbfbmx46yu7acac2jz27iwtorgmbqlkurlclmancad.onion/*", "*://qklhadlycap4cnod.onion/*", "*://c7hqkpkpemu6e7emz5b4vyz7idjgdvgaaa3dyimmeojqbgpea3xqjoid.onion/*", @@ -74,7 +77,6 @@ "web_accessible_resources": ["assets/javascripts/helpers/*"], "browser_specific_settings": { "gecko": { - "id": "{b7f9d2cd-d772-4302-8c3f-eb941af36f76}", "strict_min_version": "60.0" } } diff --git a/src/pages/background/background.js b/src/pages/background/background.js index 9df083b..4199ab1 100644 --- a/src/pages/background/background.js +++ b/src/pages/background/background.js @@ -7,6 +7,7 @@ import instagramHelper from "../../assets/javascripts/helpers/instagram.js"; import mapsHelper from "../../assets/javascripts/helpers/google-maps.js"; import redditHelper from "../../assets/javascripts/helpers/reddit.js"; import searchHelper from "../../assets/javascripts/helpers/google-search.js"; +import googleTranslateHelper from "../../assets/javascripts/helpers/google-translate.js"; const nitterInstances = twitterHelper.redirects; const twitterDomains = twitterHelper.targets; @@ -29,6 +30,9 @@ const redditBypassPaths = redditHelper.bypassPaths; const redditDefault = redditHelper.redirects[0]; const googleSearchRegex = searchHelper.targets; const searchEngineInstances = searchHelper.redirects; +const simplyTranslateInstances = googleTranslateHelper.redirects; +const simplyTranslateDefault = simplyTranslateInstances[0]; +const googleTranslateDomains = googleTranslateHelper.targets; let disableNitter; let disableInvidious; @@ -36,12 +40,14 @@ let disableBibliogram; let disableOsm; let disableReddit; let disableSearchEngine; +let disableSimplyTranslate; let nitterInstance; let invidiousInstance; let bibliogramInstance; let osmInstance; let redditInstance; let searchEngineInstance; +let simplyTranslateInstance; let alwaysProxy; let onlyEmbeddedVideo; let videoQuality; @@ -66,12 +72,14 @@ browser.storage.sync.get( "osmInstance", "redditInstance", "searchEngineInstance", + "simplyTranslateInstance", "disableNitter", "disableInvidious", "disableBibliogram", "disableOsm", "disableReddit", "disableSearchEngine", + "disableSimplyTranslate", "alwaysProxy", "onlyEmbeddedVideo", "videoQuality", @@ -93,12 +101,14 @@ browser.storage.sync.get( osmInstance = result.osmInstance || osmDefault; redditInstance = result.redditInstance || redditDefault; searchEngineInstance = result.searchEngineInstance; + simplyTranslateInstance = result.simplyTranslateInstance || simplyTranslateDefault; disableNitter = result.disableNitter; disableInvidious = result.disableInvidious; disableBibliogram = result.disableBibliogram; disableOsm = result.disableOsm; disableReddit = result.disableReddit; disableSearchEngine = result.disableSearchEngine; + disableSimplyTranslate = result.disableSimplyTranslate; alwaysProxy = result.alwaysProxy; onlyEmbeddedVideo = result.onlyEmbeddedVideo; videoQuality = result.videoQuality; @@ -138,6 +148,9 @@ browser.storage.onChanged.addListener((changes) => { if ("osmInstance" in changes) { osmInstance = changes.osmInstance.newValue || osmDefault; } + if ("simplyTranslateInstance" in changes) { + simplyTranslateInstance = changes.simplyTranslateInstance.newValue || simplyTranslateDefault; + } if ("redditInstance" in changes) { redditInstance = changes.redditInstance.newValue || redditDefault; } @@ -162,6 +175,9 @@ browser.storage.onChanged.addListener((changes) => { if ("disableSearchEngine" in changes) { disableSearchEngine = changes.disableSearchEngine.newValue; } + if ("disableSimplyTranslate" in changes) { + disableSimplyTranslate = changes.disableSimplyTranslate.newValue; + } if ("alwaysProxy" in changes) { alwaysProxy = changes.alwaysProxy.newValue; } @@ -469,6 +485,14 @@ function redirectSearchEngine(url, initiator) { return `${searchEngine.link}${searchEngine.q}?${search}`; } +function redirectGoogleTranslate(url, initiator) { + if (disableSimplyTranslate || isException(url, initiator)) { + return null; + } + + return `${simplyTranslateInstance}/${url.search}`; +} + browser.webRequest.onBeforeRequest.addListener( (details) => { const url = new URL(details.url); @@ -506,6 +530,10 @@ browser.webRequest.onBeforeRequest.addListener( redirect = { redirectUrl: redirectSearchEngine(url, initiator), }; + } else if (googleTranslateDomains.includes(url.host)) { + redirect = { + redirectUrl: redirectGoogleTranslate(url, initiator), + } } if (redirect && redirect.redirectUrl) { console.info( diff --git a/src/pages/options/options.html b/src/pages/options/options.html index 8dc1eb7..27e9fe5 100644 --- a/src/pages/options/options.html +++ b/src/pages/options/options.html @@ -164,6 +164,25 @@ +
+ + + + + + + +
+

SimplyTranslate Redirects

+
+   + +
+

Nitter Instance

@@ -229,6 +248,16 @@ />
+
+

SimplyTranslate Instance

+
+ +
+

Theme

  + + + + + +
+