diff --git a/README.md b/README.md index a73f454..28958aa 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ ## About -A web extension that redirects _Twitter, YouTube, Instagram, Google Maps, Reddit & Google Search_ requests to privacy friendly alternatives - [Nitter](https://github.com/zedeus/nitter), [Invidious](https://github.com/iv-org/invidious), [FreeTube](https://github.com/FreeTubeApp/FreeTube), [Bibliogram](https://sr.ht/~cadence/bibliogram/), [OpenStreetMap](https://www.openstreetmap.org/) & Private Search Engines like [DuckDuckGo](https://duckduckgo.com) and [Startpage](https://startpage.com). +A web extension that redirects _Twitter, YouTube, Instagram, Google Maps, Reddit, Google Search, & Google Translate_ requests to privacy friendly alternatives - [Nitter](https://github.com/zedeus/nitter), [Invidious](https://github.com/iv-org/invidious), [FreeTube](https://github.com/FreeTubeApp/FreeTube), [Bibliogram](https://sr.ht/~cadence/bibliogram/), [OpenStreetMap](https://www.openstreetmap.org/), [SimplyTranslate](https://git.sr.ht/~metalune/simplytranslate_web) & Private Search Engines like [DuckDuckGo](https://duckduckgo.com) and [Startpage](https://startpage.com). It's possible to toggle all redirects on and off. The extension will default to using random instances if none are selected. If these instances are not working, you can try and set a custom instance from the list below. @@ -29,8 +29,9 @@ It's possible to toggle all redirects on and off. The extension will default to Privacy Redirect allows setting custom instances, instances can be found here: - [Nitter instances](https://github.com/zedeus/nitter/wiki/Instances) -- [Invidious instances](https://github.com/iv-org/invidious/wiki/Invidious-Instances) +- [Invidious instances](https://docs.invidious.io/Invidious-Instances.md) - [Bibliogram instances](https://git.sr.ht/~cadence/bibliogram-docs/tree/master/docs/Instances.md) +- [SimplyTranslate instances](https://git.sr.ht/~metalune/simplytranslate_web#list-of-instances) - [OpenStreetMap tile servers](https://wiki.openstreetmap.org/wiki/Tile_servers) - Reddit alternatives: - [Libreddit](https://github.com/spikecodes/libreddit#instances) @@ -65,7 +66,7 @@ Privacy Redirect allows setting custom instances, instances can be found here: ## License -[GPLv3](LICENSE.txt). +[GPLv3](LICENSE). ## Permissions diff --git a/src/_locales/it/messages.json b/src/_locales/it/messages.json new file mode 100644 index 0000000..c5df2f4 --- /dev/null +++ b/src/_locales/it/messages.json @@ -0,0 +1,154 @@ +{ + "extensionName": { + "message": "Privacy Redirect", + "description": "Name of the extension." + }, + "extensionDescription": { + "message": "Reindirizza Twitter, YouTube, Instagram ed altri verso alternative rispettose della privacy.", + "description": "Description of the extension." + }, + "nitterInstance": { + "message": "Istanza di Nitter", + "description": "Label for Nitter instance field option (options)." + }, + "invidiousInstance": { + "message": "Istanza di Invidious", + "description": "Label for Invidious instance field option (options)." + }, + "bibliogramInstance": { + "message": "Istanza di Bibliogram", + "description": "Label for Bibliogram instance field option (options)." + }, + "osmInstance": { + "message": "Istanza di OpenStreetMap", + "description": "Label for OSM instance field option (options)." + }, + "redditInstance": { + "message": "Istanza di Reddit", + "description": "Label for Reddit instance field option (options)." + }, + "searchEngineInstance": { + "message": "Istanza del motore di ricerca", + "description": "Label for Search Engine instance field option (options)." + }, + "simplyTranslateInstance": { + "message": "Istanza di SimplyTranslate", + "description": "Label for SimplyTranslate instance field option (options)." + }, + "disableNitter": { + "message": "Reindirizzamenti Nitter", + "description": "Label for enable/disable Nitter redirects option (options & pop-up)." + }, + "disableInvidious": { + "message": "Reindirizzamenti Invidious", + "description": "Label for enable/disable Invidious redirects option (options & pop-up)." + }, + "disableBibliogram": { + "message": "Reindirizzamenti Bibliogram", + "description": "Label for enable/disable Bibliogram redirects option (options & pop-up)." + }, + "disableOsm": { + "message": "Reindirizzamenti OpenStreetMap", + "description": "Label for enable/disable OSM redirects option (options & pop-up)." + }, + "disableReddit": { + "message": "Reindirizzamenti Reddit", + "description": "Label for enable/disable Reddit redirects option (options & pop-up)." + }, + "disableSearchEngine": { + "message": "Reindirizzamenti motore di ricerca", + "description": "Label for enable/disable Search Engine redirects option (options & pop-up)." + }, + "disableSimplyTranslate": { + "message": "Reindirizzamenti SimplyTranslate", + "description": "Label for enable/disable SimplyTranslate redirects option (options & pop-up)." + }, + "alwaysProxy": { + "message": "Usa sempre il proxy per i video su Invidious", + "description": "Label for 'Always proxy videos through Invidious' option (options)." + }, + "onlyEmbeddedVideo": { + "message": "Reindirizza solo i video incorporati verso Invidious", + "description": "Label for 'Only redirect embedded video to Invidious' option (options)." + }, + "videoQuality": { + "message": "Qualità video di Invidious", + "description": "Label for 'Invidious Video Quality' option (options)." + }, + "removeTwitterSW": { + "message": "Rimuovi proattivamente il service worker di Twitter", + "description": "Label for 'Proactively remove Twitter service worker' option (options)." + }, + "invidiousDarkMode": { + "message": "Modalità scura di Invidious sempre attiva", + "description": "Label for 'Invidious dark mode always on' option (options)." + }, + "persistInvidiousPrefs": { + "message": "Mantieni le preferenze di Invidious (con cookie)", + "description": "Label for 'Persist Invidious preferences (as cookie)' option (options)." + }, + "generalTab": { + "message": "Generali", + "description": "General tab (options)." + }, + "advancedTab": { + "message": "Avanzate", + "description": "Advanced tab (options)." + }, + "exceptionsTab": { + "message": "Eccezioni", + "description": "Exceptions tab (options)." + }, + "exceptionsDescriptionP1": { + "message": "Inserisci un URL o espressione regolare da escludere dai reindirizzamenti.", + "description": "A description of the 'Exceptions' feature paragraph 1 (options)." + }, + "exceptionsDescriptionP2": { + "message": "Tutte le richieste verso o da un URL corrispondente all'eccezione saranno escluse dai reindirizzamenti.", + "description": "A description of the 'Exceptions' feature paragraph 2 (options)." + }, + "exceptionsDescriptionP3": { + "message": "Nota - Supporta le espressioni regolari JavaScript, esclusi gli slash.", + "description": "A description of the 'Exceptions' feature paragraph 3 (options)." + }, + "addException": { + "message": "Aggiungi eccezione", + "description": "'Add Exceptions' button (options)." + }, + "moreOptions": { + "message": "Altre opzioni", + "description": "More Options button (pop-up)." + }, + "privacy": { + "message": "Privacy", + "description": "Extension title - Privacy (pop-up)." + }, + "redirect": { + "message": "Reindirizza", + "description": "Extension title - Redirect (pop-up)." + }, + "version": { + "message": "Versione", + "description": "Version" + }, + "useFreeTube": { + "message": "Usa FreeTube al posto di Invidious quando possibile", + "description": "Label for 'Use FreeTube over Invidious when possible' option (options)." + }, + "nitterRandomPool": { + "message": "Gruppo di istanze Nitter casuali (separate da virgola)", + "description": "Label for 'Nitter random instance pool (comma-separated)' option (options)." + }, + "invidiousRandomPool": { + "message": "Gruppo di istanze Invidious casuali (separate da virgola)", + "description": "Label for 'Invidious random instance pool (comma-separated)' option (options)." + }, + "bibliogramRandomPool": { + "message": "Gruppo di istanze Bibliogram casuali (separate da virgola)", + "description": "Label for 'Bibliogram random instance pool (comma-separated)' option (options)." + }, + "randomInstancePlaceholder": { + "message": "Istanza casuale (nessuna selezione)", + "description": "Input placeholder for provider instance settings that select a random instance from a pool when none is selected" + } +} diff --git a/src/_locales/it/store.md b/src/_locales/it/store.md new file mode 100644 index 0000000..f4af12d --- /dev/null +++ b/src/_locales/it/store.md @@ -0,0 +1,33 @@ +# Extension Store (AMO & Chrome Web Store) Listing + +## Summary: + +``` +Una semplice estensione che reindirizza le richieste di Twitter, YouTube, Instagram e Google Maps verso alternative rispettose della privacy. +``` + +## Description: + +``` +Reindirizza le richieste di Twitter, YouTube, Instagram e Google Maps verso alternative rispettose della privacy - Nitter, Invidious, Bibliogram e OpenStreetMap. + +Permette di impostare istanze personalizzate, attivare/disattivare tutti i reindirizzamenti e altro. + +★ Maggiori informazioni: ℹ️ + + +Il codice sorgente di questa estensione è disponibile su Github. + +★ Dona: 👨🏻‍💻 +Se ti piace questa estensione e te lo puoi permettere, considera di offrirmi un caffè ☕️ ️per mostrare il tuo apprezzamento e supportare lo sviluppo del progetto. + +★ Permessi: ℹ️ + +``` diff --git a/src/_locales/ru/messages.json b/src/_locales/ru/messages.json index 769c1ea..c371532 100644 --- a/src/_locales/ru/messages.json +++ b/src/_locales/ru/messages.json @@ -31,6 +31,10 @@ "message": "Сервис поисковой системы", "description": "Название настройки (в настройках) поля сервиса поисковой системы." }, + "simplyTranslateInstance": { + "message": "Сервис SimplyTranslate", + "description": "Название настройки (в настройках) поля сервиса SimplyTranslate." + }, "disableNitter": { "message": "Перенаправление на Nitter", "description": "Название настройки для включения/выключения перенаправления на Nitter (в настройках и всплывающем окне)." @@ -55,6 +59,10 @@ "message": "Перенаправление поисковой системы", "description": "Название настройки для включения/выключения перенаправления поисковой системы (в настройках и всплывающем окне)." }, + "disableSimplyTranslate": { + "message": "Перенаправление на SimplyTranslate", + "description": "Название настройки для включения/выключения перенаправления на SimplyTranslate (в настройках и всплывающем окне)." + }, "theme": { "message": "Тема", "description": "Название настройки для 'Тема' (в настройках)." diff --git a/src/assets/javascripts/helpers/instagram.js b/src/assets/javascripts/helpers/instagram.js index 5020b4b..7759603 100644 --- a/src/assets/javascripts/helpers/instagram.js +++ b/src/assets/javascripts/helpers/instagram.js @@ -11,9 +11,8 @@ const redirects = [ "https://bibliogram.nixnet.services", "https://bibliogram.ethibox.fr", "https://bibliogram.hamster.dance", - "https://bibliogram.kavin.rocks", "https://insta.trom.tf", - "https://bibliogram.hamster.dance", + "https://bib.actionsack.com" ]; const reservedPaths = [ "about", diff --git a/src/assets/javascripts/helpers/reddit.js b/src/assets/javascripts/helpers/reddit.js index a21b328..53b309a 100644 --- a/src/assets/javascripts/helpers/reddit.js +++ b/src/assets/javascripts/helpers/reddit.js @@ -4,6 +4,7 @@ const targets = [ "new.reddit.com", "amp.reddit.com", "i.redd.it", + "redd.it", ]; const redirects = [ // libreddit: privacy w/ modern UI diff --git a/src/assets/javascripts/helpers/twitter.js b/src/assets/javascripts/helpers/twitter.js index 8ab8a81..f520d76 100644 --- a/src/assets/javascripts/helpers/twitter.js +++ b/src/assets/javascripts/helpers/twitter.js @@ -20,9 +20,7 @@ const redirects = [ "https://nitter.snopyta.org", "https://nitter.42l.fr", "https://nitter.nixnet.services", - "https://nitter.13ad.de", "https://nitter.pussthecat.org", - "https://nitter.mastodont.cat", "https://nitter.dark.fail", "https://nitter.tedomum.net", "https://nitter.cattube.org", diff --git a/src/assets/javascripts/remove-twitter-sw.js b/src/assets/javascripts/remove-twitter-sw.js index 58bec71..d431f1a 100644 --- a/src/assets/javascripts/remove-twitter-sw.js +++ b/src/assets/javascripts/remove-twitter-sw.js @@ -5,9 +5,7 @@ const nitterInstances = [ "https://nitter.snopyta.org", "https://nitter.42l.fr", "https://nitter.nixnet.services", - "https://nitter.13ad.de", "https://nitter.pussthecat.org", - "https://nitter.mastodont.cat", "https://nitter.dark.fail", "https://nitter.tedomum.net", "https://nitter.cattube.org", @@ -18,7 +16,7 @@ const nitterInstances = [ "https://nitter.cc", "https://nitter.vxempire.xyz", "https://nitter.unixfox.eu", - "https://bird.trom.tf", + "https://bird.trom.tf" ]; let disableNitter; diff --git a/src/pages/background/background.js b/src/pages/background/background.js index 8dee546..88b6f75 100644 --- a/src/pages/background/background.js +++ b/src/pages/background/background.js @@ -279,7 +279,9 @@ function redirectYouTube(url, initiator, type) { if (invidiousSubtitles) { url.searchParams.append("subtitles", invidiousSubtitles); } - url.searchParams.append("autoplay", invidiousAutoplay ? 1 : 0); + if (invidiousAutoplay) { + url.searchParams.append("autoplay", 1); + } return `${ invidiousInstance || commonHelper.getRandomInstance(invidiousRandomPool) @@ -478,6 +480,21 @@ function redirectReddit(url, initiator, type) { } else { return null; } + } else if (url.host === "redd.it") { + if ( + redditInstance.includes("teddit") && + !url.pathname.match(/^\/+[^\/]+\/+[^\/]/) + ) { + // As of 2021-04-22, redirects for teddit redd.it/foo links don't work. + // It appears that adding "/comments" as a prefix works, so manually add + // that prefix if it is missing. Even though redd.it/comments/foo links + // don't seem to work or exist, guard against affecting those kinds of + // paths. + // + // Note the difference between redd.it/comments/foo (doesn't work) and + // teddit.net/comments/foo (works). + return `${redditInstance}/comments${url.pathname}${url.search}`; + } } return `${redditInstance}${url.pathname}${url.search}`; }