include youtube links setting

This commit is contained in:
epicsam123 2025-02-06 00:30:29 -05:00 committed by GitHub
parent 164d764d55
commit 7bcff627f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
65 changed files with 176 additions and 76 deletions

View File

@ -136,11 +136,14 @@ player.on('timeupdate', function () {
let elem_yt_watch = document.getElementById('link-yt-watch'); let elem_yt_watch = document.getElementById('link-yt-watch');
let elem_yt_embed = document.getElementById('link-yt-embed'); let elem_yt_embed = document.getElementById('link-yt-embed');
let base_url_yt_watch = elem_yt_watch.getAttribute('data-base-url'); // YT links could be turned off by the user
let base_url_yt_embed = elem_yt_embed.getAttribute('data-base-url'); if (elem_yt_watch) {
let base_url_yt_watch = elem_yt_watch.getAttribute('data-base-url');
let base_url_yt_embed = elem_yt_embed.getAttribute('data-base-url');
elem_yt_watch.href = addCurrentTimeToURL(base_url_yt_watch); elem_yt_watch.href = addCurrentTimeToURL(base_url_yt_watch);
elem_yt_embed.href = addCurrentTimeToURL(base_url_yt_embed); elem_yt_embed.href = addCurrentTimeToURL(base_url_yt_embed);
}
// Invidious links // Invidious links
@ -174,7 +177,7 @@ var shareOptions = {
}; };
if (location.pathname.startsWith('/embed/')) { if (location.pathname.startsWith('/embed/')) {
var overlay_content = '<h1><a rel="noopener" target="_blank" href="' + location.origin + '/watch?v=' + video_data.id + '">' + player_data.title + '</a></h1>'; var overlay_content = '<h1><a rel="noopener noreferrer" target="_blank" href="' + location.origin + '/watch?v=' + video_data.id + '">' + player_data.title + '</a></h1>';
player.overlay({ player.overlay({
overlays: [ overlays: [
{ start: 'loadstart', content: overlay_content, end: 'playing', align: 'top'}, { start: 'loadstart', content: overlay_content, end: 'playing', align: 'top'},

View File

@ -141,7 +141,7 @@ function get_reddit_comments() {
</b> \ </b> \
</p> \ </p> \
<b> \ <b> \
<a rel="noopener" target="_blank" href="https://reddit.com{permalink}">{redditPermalinkText}</a> \ <a rel="noopener noreferrer" target="_blank" href="https://reddit.com{permalink}">{redditPermalinkText}</a> \
</b> \ </b> \
</div> \ </div> \
<div>{contentHtml}</div> \ <div>{contentHtml}</div> \

View File

@ -938,6 +938,20 @@ default_user_preferences:
## ##
#automatic_instance_redirect: false #automatic_instance_redirect: false
##
## Display YouTube redirect links on pages where they are provided.
## - Watch on Youtube (video page)
## - [YT] Comment link (comments)
## - After which you should try to page (error page)
## - watch on youtube button (search results page)
## - View channel on YouTube (channel page)
## - View playlist on YouTube (playlist page)
##
## Accepted values: true, false
## Default: true
##
#include_youtube_links: true
## ##
## Show the entire video description by default (when set to 'false', ## Show the entire video description by default (when set to 'false',
## only the first few lines of the description are shown and a ## only the first few lines of the description are shown and a

View File

@ -73,6 +73,7 @@
"preferences_thin_mode_label": "الوضع الخفيف: ", "preferences_thin_mode_label": "الوضع الخفيف: ",
"preferences_category_misc": "تفضيلات متنوعة", "preferences_category_misc": "تفضيلات متنوعة",
"preferences_automatic_instance_redirect_label": "إعادة توجيه المثيل التلقائي (إعادة التوجيه إلى redirect.invidious.io): ", "preferences_automatic_instance_redirect_label": "إعادة توجيه المثيل التلقائي (إعادة التوجيه إلى redirect.invidious.io): ",
"preferences_include_youtube_links_label": "عرض روابط إعادة التوجيه على يوتيوب: ",
"preferences_category_subscription": "تفضيلات الاشتراك", "preferences_category_subscription": "تفضيلات الاشتراك",
"preferences_annotations_subscribed_label": "عرض الملاحظات في الفيديوهات تلقائيا في القنوات المشترك بها فقط: ", "preferences_annotations_subscribed_label": "عرض الملاحظات في الفيديوهات تلقائيا في القنوات المشترك بها فقط: ",
"Redirect homepage to feed: ": "إعادة التوجية من الصفحة الرئيسية لصفحة المشتركين (لرؤية اخر فيديوهات المشتركين): ", "Redirect homepage to feed: ": "إعادة التوجية من الصفحة الرئيسية لصفحة المشتركين (لرؤية اخر فيديوهات المشتركين): ",

View File

@ -445,6 +445,7 @@
"source": "източник", "source": "източник",
"Fallback comments: ": "Резервни коментари: ", "Fallback comments: ": "Резервни коментари: ",
"preferences_automatic_instance_redirect_label": "Автоматично препращане на инстанция (чрез redirect.invidious.io): ", "preferences_automatic_instance_redirect_label": "Автоматично препращане на инстанция (чрез redirect.invidious.io): ",
"preferences_include_youtube_links_label": "Покажете пренасочващите връзки на YouTube: ",
"Maori": "Маори", "Maori": "Маори",
"generic_button_delete": "Изтрий", "generic_button_delete": "Изтрий",
"Import YouTube playlist (.csv)": "Импортиране на YouTube плейлист (.csv)", "Import YouTube playlist (.csv)": "Импортиране на YouTube плейлист (.csv)",

View File

@ -140,6 +140,7 @@
"Default": "Per defecte", "Default": "Per defecte",
"Amharic": "Amàric", "Amharic": "Amàric",
"preferences_automatic_instance_redirect_label": "Redirecció automàtica d'instàncies (retorna a redirect.invidious.io): ", "preferences_automatic_instance_redirect_label": "Redirecció automàtica d'instàncies (retorna a redirect.invidious.io): ",
"preferences_include_youtube_links_label": "Mostra els enllaços de redirecció de YouTube: ",
"Login enabled: ": "Activa inici de sessió: ", "Login enabled: ": "Activa inici de sessió: ",
"Registration enabled: ": "Activa registre: ", "Registration enabled: ": "Activa registre: ",
"Whitelisted regions: ": "Regions a la llista blanca: ", "Whitelisted regions: ": "Regions a la llista blanca: ",

View File

@ -422,6 +422,7 @@
"Erroneous CAPTCHA": "Chybná CAPTCHA", "Erroneous CAPTCHA": "Chybná CAPTCHA",
"Password is a required field": "Heslo je vyžadované pole", "Password is a required field": "Heslo je vyžadované pole",
"preferences_automatic_instance_redirect_label": "Automatické přesměrování instance (fallback na redirect.invidious.io): ", "preferences_automatic_instance_redirect_label": "Automatické přesměrování instance (fallback na redirect.invidious.io): ",
"preferences_include_youtube_links_label": "Zobrazit přesměrovací odkazy na YouTube: ",
"Switch Invidious Instance": "Přepnout instanci Invidious", "Switch Invidious Instance": "Přepnout instanci Invidious",
"Empty playlist": "Prázdný playlist", "Empty playlist": "Prázdný playlist",
"footer_source_code": "Zdrojový kód", "footer_source_code": "Zdrojový kód",

View File

@ -289,6 +289,7 @@
"Dutch": "Hollandsk", "Dutch": "Hollandsk",
"Estonian": "Estisk", "Estonian": "Estisk",
"preferences_automatic_instance_redirect_label": "Automatisk eksempel omdirigering (Fallback til redirect.invidious.io): ", "preferences_automatic_instance_redirect_label": "Automatisk eksempel omdirigering (Fallback til redirect.invidious.io): ",
"preferences_include_youtube_links_label": "Vis YouTube-omdirigeringslinks: ",
"Nepali": "Nepalesisk", "Nepali": "Nepalesisk",
"Norwegian Bokmål": "Norsk Bokmål", "Norwegian Bokmål": "Norsk Bokmål",
"(edited)": "(ændret)", "(edited)": "(ændret)",

View File

@ -74,6 +74,7 @@
"preferences_thin_mode_label": "Schlanker Modus: ", "preferences_thin_mode_label": "Schlanker Modus: ",
"preferences_category_misc": "Sonstige Einstellungen", "preferences_category_misc": "Sonstige Einstellungen",
"preferences_automatic_instance_redirect_label": "Automatische Instanzweiterleitung (über redirect.invidious.io): ", "preferences_automatic_instance_redirect_label": "Automatische Instanzweiterleitung (über redirect.invidious.io): ",
"preferences_include_youtube_links_label": "Zeige YouTube-Weiterleitungslinks: ",
"preferences_category_subscription": "Abonnementeinstellungen", "preferences_category_subscription": "Abonnementeinstellungen",
"preferences_annotations_subscribed_label": "Anmerkungen für abonnierte Kanäle standardmäßig anzeigen? ", "preferences_annotations_subscribed_label": "Anmerkungen für abonnierte Kanäle standardmäßig anzeigen? ",
"Redirect homepage to feed: ": "Startseite zu Feed umleiten: ", "Redirect homepage to feed: ": "Startseite zu Feed umleiten: ",

View File

@ -481,6 +481,7 @@
"error_video_not_in_playlist": "Το αιτούμενο βίντεο δεν υπάρχει στη δεδομένη λίστα αναπαραγωγής. <a href=\"`x`\">Πατήστε εδώ για επιστροφή στη κεντρική σελίδα λιστών αναπαραγωγής.</a>", "error_video_not_in_playlist": "Το αιτούμενο βίντεο δεν υπάρχει στη δεδομένη λίστα αναπαραγωγής. <a href=\"`x`\">Πατήστε εδώ για επιστροφή στη κεντρική σελίδα λιστών αναπαραγωγής.</a>",
"search_filters_duration_option_none": "Οποιαδήποτε διάρκεια", "search_filters_duration_option_none": "Οποιαδήποτε διάρκεια",
"preferences_automatic_instance_redirect_label": "Αυτόματη ανακατεύθυνση instance (εναλλακτική σε redirect.invidious.io): ", "preferences_automatic_instance_redirect_label": "Αυτόματη ανακατεύθυνση instance (εναλλακτική σε redirect.invidious.io): ",
"preferences_include_youtube_links_label": "Εμφάνιση συνδέσμων ανακατεύθυνσης YouTube: ",
"generic_button_delete": "Διαγραφή", "generic_button_delete": "Διαγραφή",
"Import YouTube playlist (.csv)": "Εισαγωγή λίστας αναπαραγωγής YouTube (.csv)", "Import YouTube playlist (.csv)": "Εισαγωγή λίστας αναπαραγωγής YouTube (.csv)",
"Switch Invidious Instance": "Αλλαγή Instance Invidious", "Switch Invidious Instance": "Αλλαγή Instance Invidious",

View File

@ -118,6 +118,7 @@
"preferences_thin_mode_label": "Thin mode: ", "preferences_thin_mode_label": "Thin mode: ",
"preferences_category_misc": "Miscellaneous preferences", "preferences_category_misc": "Miscellaneous preferences",
"preferences_automatic_instance_redirect_label": "Automatic instance redirection (fallback to redirect.invidious.io): ", "preferences_automatic_instance_redirect_label": "Automatic instance redirection (fallback to redirect.invidious.io): ",
"preferences_include_youtube_links_label": "Show YouTube redirect links: ",
"preferences_category_subscription": "Subscription preferences", "preferences_category_subscription": "Subscription preferences",
"preferences_annotations_subscribed_label": "Show annotations by default for subscribed channels? ", "preferences_annotations_subscribed_label": "Show annotations by default for subscribed channels? ",
"Redirect homepage to feed: ": "Redirect homepage to feed: ", "Redirect homepage to feed: ": "Redirect homepage to feed: ",

View File

@ -73,6 +73,7 @@
"preferences_thin_mode_label": "Maldika reĝimo: ", "preferences_thin_mode_label": "Maldika reĝimo: ",
"preferences_category_misc": "Aliaj agordoj", "preferences_category_misc": "Aliaj agordoj",
"preferences_automatic_instance_redirect_label": "Aŭtomata alidirektado de nodo (retropaŝo al redirect.invidious.io): ", "preferences_automatic_instance_redirect_label": "Aŭtomata alidirektado de nodo (retropaŝo al redirect.invidious.io): ",
"preferences_include_youtube_links_label": "Montri YouTube-retebligajn ligilojn: ",
"preferences_category_subscription": "Abonaj agordoj", "preferences_category_subscription": "Abonaj agordoj",
"preferences_annotations_subscribed_label": "Ĉu montri prinotojn defaŭlte por abonitaj kanaloj? ", "preferences_annotations_subscribed_label": "Ĉu montri prinotojn defaŭlte por abonitaj kanaloj? ",
"Redirect homepage to feed: ": "Alidirekti hejmpâgon al fluo: ", "Redirect homepage to feed: ": "Alidirekti hejmpâgon al fluo: ",

View File

@ -73,6 +73,7 @@
"preferences_thin_mode_label": "Modo compacto: ", "preferences_thin_mode_label": "Modo compacto: ",
"preferences_category_misc": "Preferencias misceláneas", "preferences_category_misc": "Preferencias misceláneas",
"preferences_automatic_instance_redirect_label": "Redirección automática de instancia (segunda opción a redirect.invidious.io): ", "preferences_automatic_instance_redirect_label": "Redirección automática de instancia (segunda opción a redirect.invidious.io): ",
"preferences_include_youtube_links_label": "Mostrar enlaces de redirección de YouTube: ",
"preferences_category_subscription": "Preferencias de la suscripción", "preferences_category_subscription": "Preferencias de la suscripción",
"preferences_annotations_subscribed_label": "¿Mostrar anotaciones por defecto para los canales suscritos? ", "preferences_annotations_subscribed_label": "¿Mostrar anotaciones por defecto para los canales suscritos? ",
"Redirect homepage to feed: ": "Redirigir la página de inicio a la fuente: ", "Redirect homepage to feed: ": "Redirigir la página de inicio a la fuente: ",

View File

@ -200,6 +200,7 @@
"preferences_category_data": "Dataren lehentasunak", "preferences_category_data": "Dataren lehentasunak",
"preferences_default_home_label": "Homepage lehenetsia: ", "preferences_default_home_label": "Homepage lehenetsia: ",
"preferences_automatic_instance_redirect_label": "berbideratze adibide automatikoa (atzera egin berbideratzeko: invidious.io) ", "preferences_automatic_instance_redirect_label": "berbideratze adibide automatikoa (atzera egin berbideratzeko: invidious.io) ",
"preferences_include_youtube_links_label": "Erakutsi YouTubeko birbideratze estekak ",
"`x` uploaded a video": "' x'(e)k bideo bat igo du", "`x` uploaded a video": "' x'(e)k bideo bat igo du",
"published - reverse": "argitaratuta - alderantziz", "published - reverse": "argitaratuta - alderantziz",
"Could not get channel info.": "Kanalaren adierazpena ezin lortu.", "Could not get channel info.": "Kanalaren adierazpena ezin lortu.",

View File

@ -83,6 +83,7 @@
"preferences_thin_mode_label": "حالت نازک: ", "preferences_thin_mode_label": "حالت نازک: ",
"preferences_category_misc": "ترجیحات متفرقه", "preferences_category_misc": "ترجیحات متفرقه",
"preferences_automatic_instance_redirect_label": "هدایت خودکار نمونه (انتقال به redirect.invidious.io): ", "preferences_automatic_instance_redirect_label": "هدایت خودکار نمونه (انتقال به redirect.invidious.io): ",
"preferences_include_youtube_links_label": "نمایش لینک‌های ریدایرکت یوتیوب: ",
"preferences_category_subscription": "ترجیحات اشتراک", "preferences_category_subscription": "ترجیحات اشتراک",
"preferences_annotations_subscribed_label": "نمایش حاشیه نویسی ها به طور پیشفرض برای کانال های مشترک شده: ", "preferences_annotations_subscribed_label": "نمایش حاشیه نویسی ها به طور پیشفرض برای کانال های مشترک شده: ",
"Redirect homepage to feed: ": "تغییر مسیر صفحه خانه به خوراک: ", "Redirect homepage to feed: ": "تغییر مسیر صفحه خانه به خوراک: ",

View File

@ -73,6 +73,7 @@
"preferences_thin_mode_label": "Kapea tila: ", "preferences_thin_mode_label": "Kapea tila: ",
"preferences_category_misc": "Sekalaiset asetukset", "preferences_category_misc": "Sekalaiset asetukset",
"preferences_automatic_instance_redirect_label": "Automaattinen instanssin uudelleenohjaus (perääntyminen sivulle redirect.invidious.io): ", "preferences_automatic_instance_redirect_label": "Automaattinen instanssin uudelleenohjaus (perääntyminen sivulle redirect.invidious.io): ",
"preferences_include_youtube_links_label": "Näytä YouTuben uudelleenohjauslinkit: ",
"preferences_category_subscription": "Tilausten asetukset", "preferences_category_subscription": "Tilausten asetukset",
"preferences_annotations_subscribed_label": "Näytä oletuksena tilattujen kanavien huomautukset: ", "preferences_annotations_subscribed_label": "Näytä oletuksena tilattujen kanavien huomautukset: ",
"Redirect homepage to feed: ": "Uudelleenohjaa kotisivu syötteeseen: ", "Redirect homepage to feed: ": "Uudelleenohjaa kotisivu syötteeseen: ",

View File

@ -96,6 +96,7 @@
"preferences_thin_mode_label": "Mode léger : ", "preferences_thin_mode_label": "Mode léger : ",
"preferences_category_misc": "Paramètres divers", "preferences_category_misc": "Paramètres divers",
"preferences_automatic_instance_redirect_label": "Redirection automatique vers une autre instance (via redirect.invidious.io) : ", "preferences_automatic_instance_redirect_label": "Redirection automatique vers une autre instance (via redirect.invidious.io) : ",
"preferences_include_youtube_links_label": "Afficher les liens de redirection YouTube : ",
"preferences_category_subscription": "Préférences des abonnements", "preferences_category_subscription": "Préférences des abonnements",
"preferences_annotations_subscribed_label": "Afficher les annotations par défaut sur les chaînes auxquelles vous êtes abonnés : ", "preferences_annotations_subscribed_label": "Afficher les annotations par défaut sur les chaînes auxquelles vous êtes abonnés : ",
"Redirect homepage to feed: ": "Rediriger la page d'accueil vers la page d'abonnements : ", "Redirect homepage to feed: ": "Rediriger la page d'accueil vers la page d'abonnements : ",

View File

@ -130,6 +130,7 @@
"preferences_thin_mode_label": "हल्का मोड: ", "preferences_thin_mode_label": "हल्का मोड: ",
"preferences_category_misc": "विविध प्राथमिकताएँ", "preferences_category_misc": "विविध प्राथमिकताएँ",
"preferences_automatic_instance_redirect_label": "अपने आप अनुप्रेषित करें (redirect.invidious.io पर फ़ॉलबैक करें): ", "preferences_automatic_instance_redirect_label": "अपने आप अनुप्रेषित करें (redirect.invidious.io पर फ़ॉलबैक करें): ",
"preferences_include_youtube_links_label": "यूट्यूब रीडायरेक्ट लिंक दिखाएं: ",
"preferences_category_subscription": "सदस्यताओं की प्राथमिकताएँ", "preferences_category_subscription": "सदस्यताओं की प्राथमिकताएँ",
"preferences_annotations_subscribed_label": "सदस्यता लिए गए चैनलों पर डिफ़ॉल्ट से टिप्पणियाँ दिखाएँ? ", "preferences_annotations_subscribed_label": "सदस्यता लिए गए चैनलों पर डिफ़ॉल्ट से टिप्पणियाँ दिखाएँ? ",
"Redirect homepage to feed: ": "फ़ीड पर मुखपृष्ठ को अनुप्रेषित करें: ", "Redirect homepage to feed: ": "फ़ीड पर मुखपृष्ठ को अनुप्रेषित करें: ",

View File

@ -73,6 +73,7 @@
"preferences_thin_mode_label": "Pojednostavljen prikaz: ", "preferences_thin_mode_label": "Pojednostavljen prikaz: ",
"preferences_category_misc": "Razne postavke", "preferences_category_misc": "Razne postavke",
"preferences_automatic_instance_redirect_label": "Automatsko preusmjeravanje instance (u krajnjem slučaju će se koristiti redirect.invidious.io): ", "preferences_automatic_instance_redirect_label": "Automatsko preusmjeravanje instance (u krajnjem slučaju će se koristiti redirect.invidious.io): ",
"preferences_include_youtube_links_label": "Prikaži YouTube preusmjeravajuće linkove: ",
"preferences_category_subscription": "Postavke pretplata", "preferences_category_subscription": "Postavke pretplata",
"preferences_annotations_subscribed_label": "Standardno prikaži napomene za pretplaćene kanale: ", "preferences_annotations_subscribed_label": "Standardno prikaži napomene za pretplaćene kanale: ",
"Redirect homepage to feed: ": "Preusmjeri početnu stranicu na feed: ", "Redirect homepage to feed: ": "Preusmjeri početnu stranicu na feed: ",

View File

@ -388,6 +388,7 @@
"footer_modfied_source_code": "Módosított forráskód", "footer_modfied_source_code": "Módosított forráskód",
"adminprefs_modified_source_code_url_label": "A módosított forráskód repositoryjának URL-je:", "adminprefs_modified_source_code_url_label": "A módosított forráskód repositoryjának URL-je:",
"preferences_automatic_instance_redirect_label": "Váltáskor másik Invidious oldal automatikus betöltése (redirect.invidious.io töltődik, ha nem működne): ", "preferences_automatic_instance_redirect_label": "Váltáskor másik Invidious oldal automatikus betöltése (redirect.invidious.io töltődik, ha nem működne): ",
"preferences_include_youtube_links_label": "Mutassa a YouTube átirányító linkeket: ",
"preferences_region_label": "Ország tartalmainak mutatása: ", "preferences_region_label": "Ország tartalmainak mutatása: ",
"search_filters_sort_option_relevance": "Relevancia", "search_filters_sort_option_relevance": "Relevancia",
"search_filters_sort_option_rating": "Pontszám", "search_filters_sort_option_rating": "Pontszám",

View File

@ -78,6 +78,7 @@
"preferences_thin_mode_label": "Mode tipis: ", "preferences_thin_mode_label": "Mode tipis: ",
"preferences_category_misc": "Preferensi lainnya", "preferences_category_misc": "Preferensi lainnya",
"preferences_automatic_instance_redirect_label": "Pengalihan peladen otomatis (balik kembali ke redirect.invidious.io): ", "preferences_automatic_instance_redirect_label": "Pengalihan peladen otomatis (balik kembali ke redirect.invidious.io): ",
"preferences_include_youtube_links_label": "Tampilkan tautan pengalihan YouTube: ",
"preferences_category_subscription": "Preferensi langganan", "preferences_category_subscription": "Preferensi langganan",
"preferences_annotations_subscribed_label": "Tampilkan anotasi secara baku untuk kanal yang dilanggan? ", "preferences_annotations_subscribed_label": "Tampilkan anotasi secara baku untuk kanal yang dilanggan? ",
"Redirect homepage to feed: ": "Arahkan kembali laman beranda ke umpan: ", "Redirect homepage to feed: ": "Arahkan kembali laman beranda ke umpan: ",

View File

@ -460,6 +460,7 @@
"preferences_quality_option_small": "Lítið", "preferences_quality_option_small": "Lítið",
"preferences_category_misc": "Ýmsar kjörstillingar", "preferences_category_misc": "Ýmsar kjörstillingar",
"preferences_automatic_instance_redirect_label": "Sjálfvirk endurbeining tilvika (farið til vara á redirect.invidious.io): ", "preferences_automatic_instance_redirect_label": "Sjálfvirk endurbeining tilvika (farið til vara á redirect.invidious.io): ",
"preferences_include_youtube_links_label": "Sýna YouTube umleiðingartengla: ",
"Portuguese (auto-generated)": "Portúgalska (sjálfvirkt útbúið)", "Portuguese (auto-generated)": "Portúgalska (sjálfvirkt útbúið)",
"Portuguese (Brazil)": "Portúgalska (Brasilía)", "Portuguese (Brazil)": "Portúgalska (Brasilía)",
"generic_button_edit": "Breyta", "generic_button_edit": "Breyta",

View File

@ -411,6 +411,7 @@
"download_subtitles": "Sottotitoli - `x` (.vtt)", "download_subtitles": "Sottotitoli - `x` (.vtt)",
"user_saved_playlists": "playlist salvate da `x`", "user_saved_playlists": "playlist salvate da `x`",
"preferences_automatic_instance_redirect_label": "Reindirizzamento automatico dell'istanza (ripiego su redirect.invidious.io): ", "preferences_automatic_instance_redirect_label": "Reindirizzamento automatico dell'istanza (ripiego su redirect.invidious.io): ",
"preferences_include_youtube_links_label": "Mostra i link di reindirizzamento di YouTube: ",
"Video unavailable": "Video non disponibile", "Video unavailable": "Video non disponibile",
"preferences_show_nick_label": "Mostra nickname in alto: ", "preferences_show_nick_label": "Mostra nickname in alto: ",
"videoinfo_youTube_embed_link": "Incorpora", "videoinfo_youTube_embed_link": "Incorpora",

View File

@ -78,6 +78,7 @@
"preferences_thin_mode_label": "最小モード: ", "preferences_thin_mode_label": "最小モード: ",
"preferences_category_misc": "ほかの設定", "preferences_category_misc": "ほかの設定",
"preferences_automatic_instance_redirect_label": "インスタンスの自動転送 (redirect.invidious.ioにフォールバック): ", "preferences_automatic_instance_redirect_label": "インスタンスの自動転送 (redirect.invidious.ioにフォールバック): ",
"preferences_include_youtube_links_label": "YouTubeのリダイレクトリンクを表示する: ",
"preferences_category_subscription": "登録チャンネル設定", "preferences_category_subscription": "登録チャンネル設定",
"preferences_annotations_subscribed_label": "最初から登録チャンネルのアノテーションを表示 ", "preferences_annotations_subscribed_label": "最初から登録チャンネルのアノテーションを表示 ",
"Redirect homepage to feed: ": "ホームからフィードにリダイレクト: ", "Redirect homepage to feed: ": "ホームからフィードにリダイレクト: ",

View File

@ -5,6 +5,7 @@
"preferences_annotations_subscribed_label": "구독한 채널에 기본으로 주석 표시: ", "preferences_annotations_subscribed_label": "구독한 채널에 기본으로 주석 표시: ",
"preferences_category_subscription": "구독 설정", "preferences_category_subscription": "구독 설정",
"preferences_automatic_instance_redirect_label": "자동 인스턴스 리디렉션 (redirect.invidious.io로 대체): ", "preferences_automatic_instance_redirect_label": "자동 인스턴스 리디렉션 (redirect.invidious.io로 대체): ",
"preferences_include_youtube_links_label": "YouTube 리디렉션 링크 표시: ",
"preferences_thin_mode_label": "단순 모드: ", "preferences_thin_mode_label": "단순 모드: ",
"light": "라이트", "light": "라이트",
"dark": "다크", "dark": "다크",

View File

@ -191,6 +191,7 @@
"preferences_dark_mode_label": "Tema: ", "preferences_dark_mode_label": "Tema: ",
"preferences_thin_mode_label": "Modalità legera: ", "preferences_thin_mode_label": "Modalità legera: ",
"preferences_automatic_instance_redirect_label": "Reindirizazzion automatega de la instansa (rivèrt a redirect.invidious.io): ", "preferences_automatic_instance_redirect_label": "Reindirizazzion automatega de la instansa (rivèrt a redirect.invidious.io): ",
"preferences_include_youtube_links_label": "Mostra i link de reindirizzament de YouTube: ",
"Hide annotations": "Piaca le notazioni", "Hide annotations": "Piaca le notazioni",
"Show annotations": "Mostra le notazioni", "Show annotations": "Mostra le notazioni",
"Family friendly? ": "Adàt a tüti? ", "Family friendly? ": "Adàt a tüti? ",

View File

@ -73,6 +73,7 @@
"preferences_thin_mode_label": "Sugretintas rėžimas: ", "preferences_thin_mode_label": "Sugretintas rėžimas: ",
"preferences_category_misc": "Įvairios nuostatos", "preferences_category_misc": "Įvairios nuostatos",
"preferences_automatic_instance_redirect_label": "Automatinis šaltinio nukreipimas (atsarginis nukreipimas į redirect.Invidous.io): ", "preferences_automatic_instance_redirect_label": "Automatinis šaltinio nukreipimas (atsarginis nukreipimas į redirect.Invidous.io): ",
"preferences_include_youtube_links_label": "Rodyti YouTube nukreipimo nuorodas: ",
"preferences_category_subscription": "Prenumeratų nuostatos", "preferences_category_subscription": "Prenumeratų nuostatos",
"preferences_annotations_subscribed_label": "Prenumeruojamiems kanalams subtitrus rodyti pagal nutylėjimą: ", "preferences_annotations_subscribed_label": "Prenumeruojamiems kanalams subtitrus rodyti pagal nutylėjimą: ",
"Redirect homepage to feed: ": "Peradresuoti pagrindinį puslapį į kanalų sąrašą: ", "Redirect homepage to feed: ": "Peradresuoti pagrindinį puslapį į kanalų sąrašą: ",

View File

@ -73,6 +73,7 @@
"preferences_thin_mode_label": "Tynt modus: ", "preferences_thin_mode_label": "Tynt modus: ",
"preferences_category_misc": "Ulike innstillinger", "preferences_category_misc": "Ulike innstillinger",
"preferences_automatic_instance_redirect_label": "Automatisk instansomdirigering (faller tilbake til redirect.invidious.io): ", "preferences_automatic_instance_redirect_label": "Automatisk instansomdirigering (faller tilbake til redirect.invidious.io): ",
"preferences_include_youtube_links_label": "Vis YouTube-omdirigeringslenker: ",
"preferences_category_subscription": "Abonnementsinnstillinger", "preferences_category_subscription": "Abonnementsinnstillinger",
"preferences_annotations_subscribed_label": "Vis merknader som forvalg for kanaler det abonneres på? ", "preferences_annotations_subscribed_label": "Vis merknader som forvalg for kanaler det abonneres på? ",
"Redirect homepage to feed: ": "Videresend hjemmeside til kilde: ", "Redirect homepage to feed: ": "Videresend hjemmeside til kilde: ",

View File

@ -344,6 +344,7 @@
"Current version: ": "Huidige versie: ", "Current version: ": "Huidige versie: ",
"Switch Invidious Instance": "Schakel tussen de Invidious Instanties", "Switch Invidious Instance": "Schakel tussen de Invidious Instanties",
"preferences_automatic_instance_redirect_label": "Automatische instantie-omleiding (terugval naar redirect.invidious.io): ", "preferences_automatic_instance_redirect_label": "Automatische instantie-omleiding (terugval naar redirect.invidious.io): ",
"preferences_include_youtube_links_label": "Toon YouTube-omleidingslinks: ",
"preferences_quality_dash_label": "Gewenste DASH-videokwaliteit: ", "preferences_quality_dash_label": "Gewenste DASH-videokwaliteit: ",
"preferences_region_label": "Inhoud land: ", "preferences_region_label": "Inhoud land: ",
"preferences_category_misc": "Diverse voorkeuren", "preferences_category_misc": "Diverse voorkeuren",

View File

@ -73,6 +73,7 @@
"preferences_thin_mode_label": "Tryb minimalny: ", "preferences_thin_mode_label": "Tryb minimalny: ",
"preferences_category_misc": "Różne preferencje", "preferences_category_misc": "Różne preferencje",
"preferences_automatic_instance_redirect_label": "Automatycznie przekierowanie instancji (powrót do redirect.invidious.io): ", "preferences_automatic_instance_redirect_label": "Automatycznie przekierowanie instancji (powrót do redirect.invidious.io): ",
"preferences_include_youtube_links_label": "Pokaż linki przekierowujące do YouTube: ",
"preferences_category_subscription": "Preferencje subskrypcji", "preferences_category_subscription": "Preferencje subskrypcji",
"preferences_annotations_subscribed_label": "Domyślnie wyświetlaj adnotacje dla subskrybowanych kanałów: ", "preferences_annotations_subscribed_label": "Domyślnie wyświetlaj adnotacje dla subskrybowanych kanałów: ",
"Redirect homepage to feed: ": "Przekieruj stronę główną do subskrybcji: ", "Redirect homepage to feed: ": "Przekieruj stronę główną do subskrybcji: ",

View File

@ -73,6 +73,7 @@
"preferences_thin_mode_label": "Modo compacto: ", "preferences_thin_mode_label": "Modo compacto: ",
"preferences_category_misc": "Preferências diversas", "preferences_category_misc": "Preferências diversas",
"preferences_automatic_instance_redirect_label": "Redirecionamento automático de instâncias (alternativa para redirect.invidious.io): ", "preferences_automatic_instance_redirect_label": "Redirecionamento automático de instâncias (alternativa para redirect.invidious.io): ",
"preferences_include_youtube_links_label": "Mostrar links de redirecionamento do YouTube: ",
"preferences_category_subscription": "Preferências de inscrições", "preferences_category_subscription": "Preferências de inscrições",
"preferences_annotations_subscribed_label": "Mostrar anotações por padrão para canais inscritos? ", "preferences_annotations_subscribed_label": "Mostrar anotações por padrão para canais inscritos? ",
"Redirect homepage to feed: ": "Redirecionar página inicial para o feed: ", "Redirect homepage to feed: ": "Redirecionar página inicial para o feed: ",

View File

@ -73,6 +73,7 @@
"preferences_thin_mode_label": "Modo compacto: ", "preferences_thin_mode_label": "Modo compacto: ",
"preferences_category_misc": "Preferências diversas", "preferences_category_misc": "Preferências diversas",
"preferences_automatic_instance_redirect_label": "Redirecionamento de instância automática (solução de último recurso para redirect.invidious.io): ", "preferences_automatic_instance_redirect_label": "Redirecionamento de instância automática (solução de último recurso para redirect.invidious.io): ",
"preferences_include_youtube_links_label": "Mostrar links de redirecionamento do YouTube: ",
"preferences_category_subscription": "Preferências de subscrições", "preferences_category_subscription": "Preferências de subscrições",
"preferences_annotations_subscribed_label": "Mostrar sempre anotações aos canais subscritos: ", "preferences_annotations_subscribed_label": "Mostrar sempre anotações aos canais subscritos: ",
"Redirect homepage to feed: ": "Redirecionar página inicial para subscrições: ", "Redirect homepage to feed: ": "Redirecionar página inicial para subscrições: ",

View File

@ -10,6 +10,7 @@
"Released under the AGPLv3 on Github.": "Disponibilizada sob a AGPLv3 no GitHub.", "Released under the AGPLv3 on Github.": "Disponibilizada sob a AGPLv3 no GitHub.",
"preferences_show_nick_label": "Mostrar nome de utilizador em cima: ", "preferences_show_nick_label": "Mostrar nome de utilizador em cima: ",
"preferences_automatic_instance_redirect_label": "Redirecionamento de instância automática (solução de último recurso para redirect.invidious.io): ", "preferences_automatic_instance_redirect_label": "Redirecionamento de instância automática (solução de último recurso para redirect.invidious.io): ",
"preferences_include_youtube_links_label": "Mostrar links de redirecionamento do YouTube: ",
"preferences_category_misc": "Preferências diversas", "preferences_category_misc": "Preferências diversas",
"preferences_vr_mode_label": "Vídeos interativos de 360 graus (requer WebGL): ", "preferences_vr_mode_label": "Vídeos interativos de 360 graus (requer WebGL): ",
"preferences_extend_desc_label": "Expandir automaticamente a descrição do vídeo: ", "preferences_extend_desc_label": "Expandir automaticamente a descrição do vídeo: ",

View File

@ -372,6 +372,7 @@
"preferences_quality_dash_option_1080p": "1080p", "preferences_quality_dash_option_1080p": "1080p",
"preferences_category_misc": "Setări diverse", "preferences_category_misc": "Setări diverse",
"preferences_automatic_instance_redirect_label": "Redirecționare automată de instanță (trecere prin redirect.invidious.io): ", "preferences_automatic_instance_redirect_label": "Redirecționare automată de instanță (trecere prin redirect.invidious.io): ",
"preferences_include_youtube_links_label": "Afișați linkurile de redirecționare YouTube: ",
"preferences_quality_dash_option_480p": "480p", "preferences_quality_dash_option_480p": "480p",
"preferences_quality_option_medium": "Medie", "preferences_quality_option_medium": "Medie",
"Switch Invidious Instance": "Schimbă instanța Invidious", "Switch Invidious Instance": "Schimbă instanța Invidious",

View File

@ -73,6 +73,7 @@
"preferences_thin_mode_label": "Облегчённое оформление: ", "preferences_thin_mode_label": "Облегчённое оформление: ",
"preferences_category_misc": "Прочие настройки", "preferences_category_misc": "Прочие настройки",
"preferences_automatic_instance_redirect_label": "Автоматическая смена зеркала (переход на redirect.invidious.io): ", "preferences_automatic_instance_redirect_label": "Автоматическая смена зеркала (переход на redirect.invidious.io): ",
"preferences_include_youtube_links_label": "Показать ссылки перенаправления на YouTube: ",
"preferences_category_subscription": "Настройки подписок", "preferences_category_subscription": "Настройки подписок",
"preferences_annotations_subscribed_label": "Всегда показывать аннотации на каналах из ваших подписок? ", "preferences_annotations_subscribed_label": "Всегда показывать аннотации на каналах из ваших подписок? ",
"Redirect homepage to feed: ": "Показывать подписки на главной странице: ", "Redirect homepage to feed: ": "Показывать подписки на главной странице: ",

View File

@ -54,6 +54,7 @@
"light": "svetla", "light": "svetla",
"preferences_thin_mode_label": "Tanki način: ", "preferences_thin_mode_label": "Tanki način: ",
"preferences_automatic_instance_redirect_label": "Samodejna preusmeritev (na redirect.invidious.io): ", "preferences_automatic_instance_redirect_label": "Samodejna preusmeritev (na redirect.invidious.io): ",
"preferences_include_youtube_links_label": "Prikaži povezave za preusmeritev na YouTube: ",
"preferences_annotations_subscribed_label": "Privzeto prikazati opombe za naročene kanale? ", "preferences_annotations_subscribed_label": "Privzeto prikazati opombe za naročene kanale? ",
"Redirect homepage to feed: ": "Preusmeri domačo stran na vir: ", "Redirect homepage to feed: ": "Preusmeri domačo stran na vir: ",
"preferences_max_results_label": "Število videoposnetkov, prikazanih v viru: ", "preferences_max_results_label": "Število videoposnetkov, prikazanih v viru: ",

View File

@ -87,6 +87,7 @@
"preferences_thin_mode_label": "Mënyrë e hollë: ", "preferences_thin_mode_label": "Mënyrë e hollë: ",
"preferences_category_misc": "Parapëlqime të ndryshme", "preferences_category_misc": "Parapëlqime të ndryshme",
"preferences_automatic_instance_redirect_label": "Ridrejtim i automatizuar i instancës (si parazgjedhje, te redirect.invidious.io): ", "preferences_automatic_instance_redirect_label": "Ridrejtim i automatizuar i instancës (si parazgjedhje, te redirect.invidious.io): ",
"preferences_include_youtube_links_label": "Trego lidhjet e ridrejtimit të YouTube: ",
"preferences_category_subscription": "Parapëlqime pajtimesh", "preferences_category_subscription": "Parapëlqime pajtimesh",
"preferences_annotations_subscribed_label": "Të shfaqen, si parazgjedhje, shënime për kanalet e pajtuar? ", "preferences_annotations_subscribed_label": "Të shfaqen, si parazgjedhje, shënime për kanalet e pajtuar? ",
"Redirect homepage to feed: ": "Ridrejtoje faqen hyrëse te prurje: ", "Redirect homepage to feed: ": "Ridrejtoje faqen hyrëse te prurje: ",

View File

@ -155,6 +155,7 @@
"preferences_thin_mode_label": "Kompaktni režim: ", "preferences_thin_mode_label": "Kompaktni režim: ",
"preferences_category_misc": "Ostala podešavanja", "preferences_category_misc": "Ostala podešavanja",
"preferences_automatic_instance_redirect_label": "Automatsko preusmeravanje instance (povratak na redirect.invidious.io): ", "preferences_automatic_instance_redirect_label": "Automatsko preusmeravanje instance (povratak na redirect.invidious.io): ",
"preferences_include_youtube_links_label": "Prikaži linkove za preusmeravanje na YouTube: ",
"alphabetically - reverse": "abecedno - obrnuto", "alphabetically - reverse": "abecedno - obrnuto",
"Enable web notifications": "Omogući veb obaveštenja", "Enable web notifications": "Omogući veb obaveštenja",
"`x` is live": "`x` je uživo", "`x` is live": "`x` je uživo",

View File

@ -317,6 +317,7 @@
"Released under the AGPLv3 on Github.": "Објављено под лиценцом AGPLv3 на GitHub-у.", "Released under the AGPLv3 on Github.": "Објављено под лиценцом AGPLv3 на GitHub-у.",
"Afrikaans": "Африканс", "Afrikaans": "Африканс",
"preferences_automatic_instance_redirect_label": "Аутоматско преусмеравање инстанце (повратак на redirect.invidious.io): ", "preferences_automatic_instance_redirect_label": "Аутоматско преусмеравање инстанце (повратак на redirect.invidious.io): ",
"preferences_include_youtube_links_label": "Прикажи линкове за преусмеравање на YouTube-у: ",
"Please log in": "Молимо, пријавите се", "Please log in": "Молимо, пријавите се",
"English (auto-generated)": "Енглески (аутоматски генерисано)", "English (auto-generated)": "Енглески (аутоматски генерисано)",
"Hindi": "Хинди", "Hindi": "Хинди",

View File

@ -476,6 +476,7 @@
"preferences_quality_dash_option_240p": "240p", "preferences_quality_dash_option_240p": "240p",
"Chinese": "Kinesiska", "Chinese": "Kinesiska",
"preferences_automatic_instance_redirect_label": "Automatisk instansomdirigering (återgång till redirect.invidious.io): ", "preferences_automatic_instance_redirect_label": "Automatisk instansomdirigering (återgång till redirect.invidious.io): ",
"preferences_include_youtube_links_label": "Visa omdirigeringslänkar för YouTube: ",
"generic_button_delete": "Radera", "generic_button_delete": "Radera",
"Import YouTube playlist (.csv)": "Importera YouTube spellista (.csv)", "Import YouTube playlist (.csv)": "Importera YouTube spellista (.csv)",
"next_steps_error_message": "Därefter bör du försöka: ", "next_steps_error_message": "Därefter bör du försöka: ",

View File

@ -73,6 +73,7 @@
"preferences_thin_mode_label": "İnce Mod: ", "preferences_thin_mode_label": "İnce Mod: ",
"preferences_category_misc": "Çeşitli Tercihler", "preferences_category_misc": "Çeşitli Tercihler",
"preferences_automatic_instance_redirect_label": "Otomatik Örnek Yeniden Yönlendirmesi (Yedek: redirect.invidious.io): ", "preferences_automatic_instance_redirect_label": "Otomatik Örnek Yeniden Yönlendirmesi (Yedek: redirect.invidious.io): ",
"preferences_include_youtube_links_label": "Youtube yönlendirme bağlantılarını göster: ",
"preferences_category_subscription": "Abonelik Tercihleri", "preferences_category_subscription": "Abonelik Tercihleri",
"preferences_annotations_subscribed_label": "Abone Olunan Kanallar İçin Ek Açıklamaları Öntanımlı Olarak Göster: ", "preferences_annotations_subscribed_label": "Abone Olunan Kanallar İçin Ek Açıklamaları Öntanımlı Olarak Göster: ",
"Redirect homepage to feed: ": "Ana Sayfayı Akışa Yönlendir: ", "Redirect homepage to feed: ": "Ana Sayfayı Akışa Yönlendir: ",

View File

@ -415,6 +415,7 @@
"preferences_quality_option_hd720": "HD720", "preferences_quality_option_hd720": "HD720",
"preferences_quality_dash_option_2160p": "2160p", "preferences_quality_dash_option_2160p": "2160p",
"preferences_automatic_instance_redirect_label": "Автоматична зміна сервера (redirect.invidious.io як резерв): ", "preferences_automatic_instance_redirect_label": "Автоматична зміна сервера (redirect.invidious.io як резерв): ",
"preferences_include_youtube_links_label": "Показати посилання на перенаправлення YouTube: ",
"Switch Invidious Instance": "Інший сервер Invidious", "Switch Invidious Instance": "Інший сервер Invidious",
"preferences_quality_dash_option_480p": "480p", "preferences_quality_dash_option_480p": "480p",
"Chinese (Taiwan)": "Китайська (Тайвань)", "Chinese (Taiwan)": "Китайська (Тайвань)",

View File

@ -75,6 +75,7 @@
"preferences_thin_mode_label": "Chế độ mỏng: ", "preferences_thin_mode_label": "Chế độ mỏng: ",
"preferences_category_misc": "Tùy chọn khác", "preferences_category_misc": "Tùy chọn khác",
"preferences_automatic_instance_redirect_label": "Tự động chuyển hướng phiên bản (dự phòng về redirect.invidious.io): ", "preferences_automatic_instance_redirect_label": "Tự động chuyển hướng phiên bản (dự phòng về redirect.invidious.io): ",
"preferences_include_youtube_links_label": "Hiển thị liên kết chuyển hướng YouTube: ",
"preferences_category_subscription": "Tùy chọn đăng ký", "preferences_category_subscription": "Tùy chọn đăng ký",
"preferences_annotations_subscribed_label": "Hiển thị chú thích theo mặc định cho các kênh đã đăng ký: ", "preferences_annotations_subscribed_label": "Hiển thị chú thích theo mặc định cho các kênh đã đăng ký: ",
"Redirect homepage to feed: ": "Chuyển hướng trang chủ đến nguồn cấp dữ liệu: ", "Redirect homepage to feed: ": "Chuyển hướng trang chủ đến nguồn cấp dữ liệu: ",

View File

@ -78,6 +78,7 @@
"preferences_thin_mode_label": "窄页模式: ", "preferences_thin_mode_label": "窄页模式: ",
"preferences_category_misc": "其他选项", "preferences_category_misc": "其他选项",
"preferences_automatic_instance_redirect_label": "自动实例重定向 (回退到redirect.invidious.io): ", "preferences_automatic_instance_redirect_label": "自动实例重定向 (回退到redirect.invidious.io): ",
"preferences_include_youtube_links_label": "显示YouTube重定向链接: ",
"preferences_category_subscription": "订阅设置", "preferences_category_subscription": "订阅设置",
"preferences_annotations_subscribed_label": "默认情况下显示已订阅频道的注释: ", "preferences_annotations_subscribed_label": "默认情况下显示已订阅频道的注释: ",
"Redirect homepage to feed: ": "跳转主页到 feed: ", "Redirect homepage to feed: ": "跳转主页到 feed: ",

View File

@ -78,6 +78,7 @@
"preferences_thin_mode_label": "精簡模式: ", "preferences_thin_mode_label": "精簡模式: ",
"preferences_category_misc": "其他偏好設定", "preferences_category_misc": "其他偏好設定",
"preferences_automatic_instance_redirect_label": "自動站台重新導向(汰退至 redirect.invidious.io ", "preferences_automatic_instance_redirect_label": "自動站台重新導向(汰退至 redirect.invidious.io ",
"preferences_include_youtube_links_label": "顯示YouTube重定向連結: ",
"preferences_category_subscription": "訂閱偏好設定", "preferences_category_subscription": "訂閱偏好設定",
"preferences_annotations_subscribed_label": "預設為已訂閱的頻道顯示註釋: ", "preferences_annotations_subscribed_label": "預設為已訂閱的頻道顯示註釋: ",
"Redirect homepage to feed: ": "重新導向首頁至 feed ", "Redirect homepage to feed: ": "重新導向首頁至 feed ",

View File

@ -1,7 +1,7 @@
private IMAGE_QUALITIES = {320, 560, 640, 1280, 2000} private IMAGE_QUALITIES = {320, 560, 640, 1280, 2000}
# TODO: Add "sort_by" # TODO: Add "sort_by"
def fetch_channel_community(ucid, cursor, locale, format, thin_mode) def fetch_channel_community(ucid, cursor, locale, format, thin_mode, include_youtube_links)
if cursor.nil? if cursor.nil?
# Egljb21tdW5pdHk%3D is the protobuf object to load "community" # Egljb21tdW5pdHk%3D is the protobuf object to load "community"
initial_data = YoutubeAPI.browse(ucid, params: "Egljb21tdW5pdHk%3D") initial_data = YoutubeAPI.browse(ucid, params: "Egljb21tdW5pdHk%3D")
@ -21,10 +21,10 @@ def fetch_channel_community(ucid, cursor, locale, format, thin_mode)
items = container.as_a items = container.as_a
end end
return extract_channel_community(items, ucid: ucid, locale: locale, format: format, thin_mode: thin_mode) return extract_channel_community(items, ucid: ucid, locale: locale, format: format, thin_mode: thin_mode, include_youtube_links: include_youtube_links)
end end
def fetch_channel_community_post(ucid, post_id, locale, format, thin_mode) def fetch_channel_community_post(ucid, post_id, locale, format, thin_mode, include_youtube_links)
object = { object = {
"2:string" => "community", "2:string" => "community",
"25:embedded" => { "25:embedded" => {
@ -47,10 +47,10 @@ def fetch_channel_community_post(ucid, post_id, locale, format, thin_mode)
items << item items << item
end end
return extract_channel_community(items, ucid: ucid, locale: locale, format: format, thin_mode: thin_mode, is_single_post: true) return extract_channel_community(items, ucid: ucid, locale: locale, format: format, thin_mode: thin_mode, include_youtube_links: include_youtube_links, is_single_post: true)
end end
def extract_channel_community(items, *, ucid, locale, format, thin_mode, is_single_post : Bool = false) def extract_channel_community(items, *, ucid, locale, format, thin_mode, include_youtube_links, is_single_post : Bool = false)
if message = items[0]["messageRenderer"]? if message = items[0]["messageRenderer"]?
error_message = (message["text"]["simpleText"]? || error_message = (message["text"]["simpleText"]? ||
message["text"]["runs"]?.try &.[0]?.try &.["text"]?) message["text"]["runs"]?.try &.[0]?.try &.["text"]?)
@ -279,7 +279,7 @@ def extract_channel_community(items, *, ucid, locale, format, thin_mode, is_sing
if format == "html" if format == "html"
response = JSON.parse(response) response = JSON.parse(response)
content_html = IV::Frontend::Comments.template_youtube(response, locale, thin_mode) content_html = IV::Frontend::Comments.template_youtube(response, locale, thin_mode, include_youtube_links)
response = JSON.build do |json| response = JSON.build do |json|
json.object do json.object do

View File

@ -1,7 +1,7 @@
module Invidious::Comments module Invidious::Comments
extend self extend self
def fetch_youtube(id, cursor, format, locale, thin_mode, region, sort_by = "top") def fetch_youtube(id, cursor, format, locale, thin_mode, region, include_youtube_links, sort_by = "top")
case cursor case cursor
when nil, "" when nil, ""
ctoken = Comments.produce_continuation(id, cursor: "", sort_by: sort_by) ctoken = Comments.produce_continuation(id, cursor: "", sort_by: sort_by)
@ -13,7 +13,7 @@ module Invidious::Comments
client_config = YoutubeAPI::ClientConfig.new(region: region) client_config = YoutubeAPI::ClientConfig.new(region: region)
response = YoutubeAPI.next(continuation: ctoken, client_config: client_config) response = YoutubeAPI.next(continuation: ctoken, client_config: client_config)
return parse_youtube(id, response, format, locale, thin_mode, sort_by) return parse_youtube(id, response, format, locale, thin_mode, include_youtube_links, sort_by)
end end
def fetch_community_post_comments(ucid, post_id) def fetch_community_post_comments(ucid, post_id)
@ -57,7 +57,7 @@ module Invidious::Comments
return initial_data return initial_data
end end
def parse_youtube(id, response, format, locale, thin_mode, sort_by = "top", is_post = false) def parse_youtube(id, response, format, locale, thin_mode, include_youtube_links, sort_by = "top", is_post = false)
contents = nil contents = nil
if on_response_received_endpoints = response["onResponseReceivedEndpoints"]? if on_response_received_endpoints = response["onResponseReceivedEndpoints"]?
@ -302,7 +302,7 @@ module Invidious::Comments
if format == "html" if format == "html"
response = JSON.parse(response) response = JSON.parse(response)
content_html = Frontend::Comments.template_youtube(response, locale, thin_mode) content_html = Frontend::Comments.template_youtube(response, locale, thin_mode, include_youtube_links)
response = JSON.build do |json| response = JSON.build do |json|
json.object do json.object do
json.field "contentHtml", content_html json.field "contentHtml", content_html

View File

@ -33,6 +33,7 @@ struct ConfigPreferences
property default_home : String? = "Popular" property default_home : String? = "Popular"
property feed_menu : Array(String) = ["Popular", "Trending", "Subscriptions", "Playlists"] property feed_menu : Array(String) = ["Popular", "Trending", "Subscriptions", "Playlists"]
property automatic_instance_redirect : Bool = false property automatic_instance_redirect : Bool = false
property include_youtube_links : Bool = true
property region : String = "US" property region : String = "US"
property related_videos : Bool = true property related_videos : Bool = true
property sort : String = "published" property sort : String = "published"

View File

@ -1,7 +1,7 @@
module Invidious::Frontend::Comments module Invidious::Frontend::Comments
extend self extend self
def template_youtube(comments, locale, thin_mode, is_replies = false) def template_youtube(comments, locale, thin_mode, include_youtube_links, is_replies = false)
String.build do |html| String.build do |html|
root = comments["comments"].as_a root = comments["comments"].as_a
root.each do |child| root.each do |child|
@ -147,16 +147,18 @@ module Invidious::Frontend::Comments
| |
END_HTML END_HTML
if comments["videoId"]? if include_youtube_links
html << <<-END_HTML if comments["videoId"]?
<a rel="noreferrer noopener" href="https://www.youtube.com/watch?v=#{comments["videoId"]}&lc=#{child["commentId"]}" title="#{translate(locale, "YouTube comment permalink")}">[YT]</a> html << <<-END_HTML
| <a rel="noreferrer noopener" href="https://www.youtube.com/watch?v=#{comments["videoId"]}&lc=#{child["commentId"]}" title="#{translate(locale, "YouTube comment permalink")}">[YT]</a>
END_HTML |
elsif comments["authorId"]? END_HTML
html << <<-END_HTML elsif comments["authorId"]?
<a rel="noreferrer noopener" href="https://www.youtube.com/channel/#{comments["authorId"]}/community?lb=#{child["commentId"]}" title="#{translate(locale, "YouTube comment permalink")}">[YT]</a> html << <<-END_HTML
| <a rel="noreferrer noopener" href="https://www.youtube.com/channel/#{comments["authorId"]}/community?lb=#{child["commentId"]}" title="#{translate(locale, "YouTube comment permalink")}">[YT]</a>
END_HTML |
END_HTML
end
end end
html << <<-END_HTML html << <<-END_HTML

View File

@ -182,7 +182,7 @@ def error_redirect_helper(env : HTTP::Server::Context)
go_to_youtube = translate(locale, "next_steps_error_message_go_to_youtube") go_to_youtube = translate(locale, "next_steps_error_message_go_to_youtube")
switch_instance = translate(locale, "Switch Invidious Instance") switch_instance = translate(locale, "Switch Invidious Instance")
return <<-END_HTML html = return <<-END_HTML
<p style="margin-bottom: 4px;">#{next_steps_text}</p> <p style="margin-bottom: 4px;">#{next_steps_text}</p>
<ul> <ul>
<li> <li>
@ -191,11 +191,21 @@ def error_redirect_helper(env : HTTP::Server::Context)
<li> <li>
<a href="/redirect?referer=#{env.get("current_page")}">#{switch_instance}</a> <a href="/redirect?referer=#{env.get("current_page")}">#{switch_instance}</a>
</li> </li>
END_HTML
if env.get("preferences").as(Preferences).include_youtube_links
html += <<-END_HTML
<li> <li>
<a rel="noreferrer noopener" href="https://youtube.com#{env.request.resource}">#{go_to_youtube}</a> <a rel="noreferrer noopener" href="https://youtube.com#{env.request.resource}">#{go_to_youtube}</a>
</li> </li>
END_HTML
end
html += <<-END_HTML
</ul> </ul>
END_HTML END_HTML
return html
else else
return "" return ""
end end

View File

@ -370,6 +370,7 @@ module Invidious::Routes::API::V1::Channels
def self.community(env) def self.community(env)
locale = env.get("preferences").as(Preferences).locale locale = env.get("preferences").as(Preferences).locale
include_youtube_links = env.get("preferences").as(Preferences).include_youtube_links
env.response.content_type = "application/json" env.response.content_type = "application/json"
@ -385,7 +386,7 @@ module Invidious::Routes::API::V1::Channels
# sort_by = env.params.query["sort_by"]?.try &.downcase # sort_by = env.params.query["sort_by"]?.try &.downcase
begin begin
fetch_channel_community(ucid, continuation, locale, format, thin_mode) fetch_channel_community(ucid, continuation, locale, format, thin_mode, include_youtube_links)
rescue ex rescue ex
return error_json(500, ex) return error_json(500, ex)
end end
@ -393,6 +394,7 @@ module Invidious::Routes::API::V1::Channels
def self.post(env) def self.post(env)
locale = env.get("preferences").as(Preferences).locale locale = env.get("preferences").as(Preferences).locale
include_youtube_links = env.get("preferences").as(Preferences).include_youtube_links
env.response.content_type = "application/json" env.response.content_type = "application/json"
id = env.params.url["id"].to_s id = env.params.url["id"].to_s
@ -413,7 +415,7 @@ module Invidious::Routes::API::V1::Channels
end end
begin begin
fetch_channel_community_post(ucid, id, locale, format, thin_mode) fetch_channel_community_post(ucid, id, locale, format, thin_mode, include_youtube_links)
rescue ex rescue ex
return error_json(500, ex) return error_json(500, ex)
end end
@ -421,6 +423,7 @@ module Invidious::Routes::API::V1::Channels
def self.post_comments(env) def self.post_comments(env)
locale = env.get("preferences").as(Preferences).locale locale = env.get("preferences").as(Preferences).locale
include_youtube_links = env.get("preferences").as(Preferences).include_youtube_links
env.response.content_type = "application/json" env.response.content_type = "application/json"
@ -441,7 +444,7 @@ module Invidious::Routes::API::V1::Channels
else else
comments = YoutubeAPI.browse(continuation: continuation) comments = YoutubeAPI.browse(continuation: continuation)
end end
return Comments.parse_youtube(id, comments, format, locale, thin_mode, is_post: true) return Comments.parse_youtube(id, comments, format, locale, thin_mode, include_youtube_links, is_post: true)
end end
def self.channels(env) def self.channels(env)

View File

@ -320,6 +320,7 @@ module Invidious::Routes::API::V1::Videos
def self.comments(env) def self.comments(env)
locale = env.get("preferences").as(Preferences).locale locale = env.get("preferences").as(Preferences).locale
include_youtube_links = env.get("preferences").as(Preferences).include_youtube_links
region = env.params.query["region"]? region = env.params.query["region"]?
env.response.content_type = "application/json" env.response.content_type = "application/json"
@ -345,7 +346,7 @@ module Invidious::Routes::API::V1::Videos
sort_by ||= "top" sort_by ||= "top"
begin begin
comments = Comments.fetch_youtube(id, continuation, format, locale, thin_mode, region, sort_by: sort_by) comments = Comments.fetch_youtube(id, continuation, format, locale, thin_mode, region, include_youtube_links, sort_by: sort_by)
rescue ex : NotFoundException rescue ex : NotFoundException
return error_json(404, ex) return error_json(404, ex)
rescue ex rescue ex

View File

@ -212,6 +212,8 @@ module Invidious::Routes::Channels
thin_mode = env.params.query["thin_mode"]? || env.get("preferences").as(Preferences).thin_mode thin_mode = env.params.query["thin_mode"]? || env.get("preferences").as(Preferences).thin_mode
thin_mode = thin_mode == "true" thin_mode = thin_mode == "true"
include_youtube_links = env.get("preferences").as(Preferences).include_youtube_links
continuation = env.params.query["continuation"]? continuation = env.params.query["continuation"]?
if !channel.tabs.includes? "community" if !channel.tabs.includes? "community"
@ -223,7 +225,7 @@ module Invidious::Routes::Channels
sort_options = [] of String sort_options = [] of String
begin begin
items = JSON.parse(fetch_channel_community(ucid, continuation, locale, "json", thin_mode)) items = JSON.parse(fetch_channel_community(ucid, continuation, locale, "json", thin_mode, include_youtube_links))
rescue ex : InfoException rescue ex : InfoException
env.response.status_code = 500 env.response.status_code = 500
error_message = ex.message error_message = ex.message
@ -245,6 +247,7 @@ module Invidious::Routes::Channels
prefs = env.get("preferences").as(Preferences) prefs = env.get("preferences").as(Preferences)
locale = prefs.locale locale = prefs.locale
include_youtube_links = prefs.include_youtube_links
thin_mode = env.params.query["thin_mode"]? || prefs.thin_mode thin_mode = env.params.query["thin_mode"]? || prefs.thin_mode
thin_mode = thin_mode == "true" thin_mode = thin_mode == "true"
@ -256,21 +259,19 @@ module Invidious::Routes::Channels
if !ucid.nil? if !ucid.nil?
ucid = ucid.to_s ucid = ucid.to_s
post_response = fetch_channel_community_post(ucid, id, locale, "json", thin_mode)
else else
# resolve the url to get the author's UCID # resolve the url to get the author's UCID
response = YoutubeAPI.resolve_url("https://www.youtube.com/post/#{id}") response = YoutubeAPI.resolve_url("https://www.youtube.com/post/#{id}")
return error_template(400, "Invalid post ID") if response["error"]? return error_template(400, "Invalid post ID") if response["error"]?
ucid = response.dig("endpoint", "browseEndpoint", "browseId").as_s ucid = response.dig("endpoint", "browseEndpoint", "browseId").as_s
post_response = fetch_channel_community_post(ucid, id, locale, "json", thin_mode)
end end
post_response = JSON.parse(post_response) post_response = JSON.parse(fetch_channel_community_post(ucid, id, locale, "json", thin_mode, include_youtube_links))
if nojs if nojs
comments = Comments.fetch_community_post_comments(ucid, id) comments = Comments.fetch_community_post_comments(ucid, id)
comment_html = JSON.parse(Comments.parse_youtube(id, comments, "html", locale, thin_mode, is_post: true))["contentHtml"] comment_html = JSON.parse(Comments.parse_youtube(id, comments, "html", locale, thin_mode, include_youtube_links, is_post: true))["contentHtml"]
end end
templated "post" templated "post"
end end

View File

@ -114,6 +114,10 @@ module Invidious::Routes::PreferencesRoute
automatic_instance_redirect ||= "off" automatic_instance_redirect ||= "off"
automatic_instance_redirect = automatic_instance_redirect == "on" automatic_instance_redirect = automatic_instance_redirect == "on"
include_youtube_links = env.params.body["include_youtube_links"]?.try &.as(String)
include_youtube_links ||= "off"
include_youtube_links = include_youtube_links == "on"
region = env.params.body["region"]?.try &.as(String) region = env.params.body["region"]?.try &.as(String)
locale = env.params.body["locale"]?.try &.as(String) locale = env.params.body["locale"]?.try &.as(String)
@ -168,6 +172,7 @@ module Invidious::Routes::PreferencesRoute
default_home: default_home, default_home: default_home,
feed_menu: feed_menu, feed_menu: feed_menu,
automatic_instance_redirect: automatic_instance_redirect, automatic_instance_redirect: automatic_instance_redirect,
include_youtube_links: include_youtube_links,
region: region, region: region,
related_videos: related_videos, related_videos: related_videos,
sort: sort, sort: sort,

View File

@ -2,8 +2,12 @@
module Invidious::Routes::Watch module Invidious::Routes::Watch
def self.handle(env) def self.handle(env)
locale = env.get("preferences").as(Preferences).locale preferences = env.get("preferences").as(Preferences)
locale = preferences.locale
thin_mode = preferences.thin_mode
region = env.params.query["region"]? region = env.params.query["region"]?
include_youtube_links = preferences.include_youtube_links
if env.params.query.to_s.includes?("%20") || env.params.query.to_s.includes?("+") if env.params.query.to_s.includes?("%20") || env.params.query.to_s.includes?("+")
url = "/watch?" + env.params.query.to_s.gsub("%20", "").delete("+") url = "/watch?" + env.params.query.to_s.gsub("%20", "").delete("+")
@ -38,8 +42,6 @@ module Invidious::Routes::Watch
nojs ||= "0" nojs ||= "0"
nojs = nojs == "1" nojs = nojs == "1"
preferences = env.get("preferences").as(Preferences)
user = env.get?("user").try &.as(User) user = env.get?("user").try &.as(User)
if user if user
subscriptions = user.subscriptions subscriptions = user.subscriptions
@ -87,7 +89,7 @@ module Invidious::Routes::Watch
if source == "youtube" if source == "youtube"
begin begin
comment_html = JSON.parse(Comments.fetch_youtube(id, nil, "html", locale, preferences.thin_mode, region))["contentHtml"] comment_html = JSON.parse(Comments.fetch_youtube(id, nil, "html", locale, thin_mode, region, include_youtube_links))["contentHtml"]
rescue ex rescue ex
if preferences.comments[1] == "reddit" if preferences.comments[1] == "reddit"
comments, reddit_thread = Comments.fetch_reddit(id) comments, reddit_thread = Comments.fetch_reddit(id)
@ -106,12 +108,12 @@ module Invidious::Routes::Watch
comment_html = Comments.replace_links(comment_html) comment_html = Comments.replace_links(comment_html)
rescue ex rescue ex
if preferences.comments[1] == "youtube" if preferences.comments[1] == "youtube"
comment_html = JSON.parse(Comments.fetch_youtube(id, nil, "html", locale, preferences.thin_mode, region))["contentHtml"] comment_html = JSON.parse(Comments.fetch_youtube(id, nil, "html", locale, thin_mode, region, include_youtube_links))["contentHtml"]
end end
end end
end end
else else
comment_html = JSON.parse(Comments.fetch_youtube(id, nil, "html", locale, preferences.thin_mode, region))["contentHtml"] comment_html = JSON.parse(Comments.fetch_youtube(id, nil, "html", locale, thin_mode, region, include_youtube_links))["contentHtml"]
end end
comment_html ||= "" comment_html ||= ""

View File

@ -7,6 +7,7 @@ struct Preferences
property preload : Bool = CONFIG.default_user_preferences.preload property preload : Bool = CONFIG.default_user_preferences.preload
property autoplay : Bool = CONFIG.default_user_preferences.autoplay property autoplay : Bool = CONFIG.default_user_preferences.autoplay
property automatic_instance_redirect : Bool = CONFIG.default_user_preferences.automatic_instance_redirect property automatic_instance_redirect : Bool = CONFIG.default_user_preferences.automatic_instance_redirect
property include_youtube_links : Bool = CONFIG.default_user_preferences.include_youtube_links
@[JSON::Field(converter: Preferences::StringToArray)] @[JSON::Field(converter: Preferences::StringToArray)]
@[YAML::Field(converter: Preferences::StringToArray)] @[YAML::Field(converter: Preferences::StringToArray)]

View File

@ -27,7 +27,7 @@
</div> </div>
<% else %> <% else %>
<div class="h-box pure-g comments" id="comments"> <div class="h-box pure-g comments" id="comments">
<%= IV::Frontend::Comments.template_youtube(items.not_nil!, locale, thin_mode) %> <%= IV::Frontend::Comments.template_youtube(items.not_nil!, locale, thin_mode, include_youtube_links) %>
</div> </div>
<% end %> <% end %>

View File

@ -36,9 +36,12 @@
<div class="pure-g h-box"> <div class="pure-g h-box">
<div class="pure-u-1-2"> <div class="pure-u-1-2">
<div class="pure-u-1 pure-md-1-3"> <% if env.get("preferences").as(Preferences).include_youtube_links%>
<a href="<%= youtube_url %>"><%= translate(locale, "View channel on YouTube") %></a> <div class="pure-u-1 pure-md-1-3">
</div> <a rel="noreferrer noopener" href="<%= youtube_url %>"><%= translate(locale, "View channel on YouTube") %></a>
</div>
<% end %>
<div class="pure-u-1 pure-md-1-3"> <div class="pure-u-1 pure-md-1-3">
<a href="<%= redirect_url %>"><%= translate(locale, "Switch Invidious Instance") %></a> <a href="<%= redirect_url %>"><%= translate(locale, "Switch Invidious Instance") %></a>
</div> </div>

View File

@ -1,8 +1,11 @@
<div class="flex-right flexible"> <div class="flex-right flexible">
<div class="icon-buttons"> <div class="icon-buttons">
<a title="<%=translate(locale, "videoinfo_watch_on_youTube")%>" rel="noreferrer noopener" href="https://www.youtube.com/watch<%=endpoint_params%>"> <% if env.get("preferences").as(Preferences).include_youtube_links%>
<i class="icon ion-logo-youtube"></i> <a title="<%=translate(locale, "videoinfo_watch_on_youTube")%>" rel="noreferrer noopener" href="https://www.youtube.com/watch<%=endpoint_params%>">
</a> <i class="icon ion-logo-youtube"></i>
</a>
<% end %>
<a title="<%=translate(locale, "Audio mode")%>" href="/watch<%=endpoint_params%>&listen=1"> <a title="<%=translate(locale, "Audio mode")%>" href="/watch<%=endpoint_params%>&listen=1">
<i class="icon ion-md-headset"></i> <i class="icon ion-md-headset"></i>
</a> </a>

View File

@ -83,20 +83,22 @@
<% if !playlist.is_a? InvidiousPlaylist %> <% if !playlist.is_a? InvidiousPlaylist %>
<div class="pure-u-2-3"> <div class="pure-u-2-3">
<% if env.get("preferences").as(Preferences).include_youtube_links%>
<a rel="noreferrer noopener" href="https://www.youtube.com/playlist?list=<%= playlist.id %>"> <a rel="noreferrer noopener" href="https://www.youtube.com/playlist?list=<%= playlist.id %>">
<%= translate(locale, "View playlist on YouTube") %> <%= translate(locale, "View playlist on YouTube") %>
</a> </a>
<span> | </span> <span> | </span>
<% end %>
<% if env.get("preferences").as(Preferences).automatic_instance_redirect%> <% if env.get("preferences").as(Preferences).automatic_instance_redirect%>
<a href="/redirect?referer=<%= env.get?("current_page") %>"> <a href="/redirect?referer=<%= env.get?("current_page") %>">
<%= translate(locale, "Switch Invidious Instance") %> <%= translate(locale, "Switch Invidious Instance") %>
</a> </a>
<% else %> <% else %>
<a href="https://redirect.invidious.io/playlist?list=<%= playlist.id %>"> <a href="https://redirect.invidious.io/playlist?list=<%= playlist.id %>">
<%= translate(locale, "Switch Invidious Instance") %> <%= translate(locale, "Switch Invidious Instance") %>
</a> </a>
<% end %> <% end %>
</div> </div>
<% end %> <% end %>
</div> </div>

View File

@ -4,7 +4,7 @@
<div> <div>
<div id="post" class="comments post-comments"> <div id="post" class="comments post-comments">
<%= IV::Frontend::Comments.template_youtube(post_response.not_nil!, locale, thin_mode) %> <%= IV::Frontend::Comments.template_youtube(post_response.not_nil!, locale, thin_mode, include_youtube_links) %>
</div> </div>
<% if nojs %> <% if nojs %>

View File

@ -37,7 +37,7 @@
2019-01-19 16:37:53 +00:00 200 GET /vi/r5P-f5arPXE/maxres.jpg 1085.41ms 2019-01-19 16:37:53 +00:00 200 GET /vi/r5P-f5arPXE/maxres.jpg 1085.41ms
2019-01-19 16:37:54 +00:00 200 GET /watch 7.04ms</code></pre> 2019-01-19 16:37:54 +00:00 200 GET /watch 7.04ms</code></pre>
<p>This website does not store the visitor's user-agent or IP address and does not use fingerprinting, advertisements, or tracking of any form.</p> <p>This website does not store the visitor's user-agent or IP address and does not use fingerprinting, advertisements, or tracking of any form.</p>
<p>This website provides links to googlevideo.com to provide audio and video playback. googlevideo.com is owned by Google and is subject to their <a href="https://policies.google.com/privacy">privacy policy</a>.</p> <p>This website provides links to googlevideo.com to provide audio and video playback. googlevideo.com is owned by Google and is subject to their <a rel="noopener noreferrer" href="https://policies.google.com/privacy">privacy policy</a>.</p>
<h3>Data stored in your browser</h3> <h3>Data stored in your browser</h3>
<p>This website uses browser cookies to authenticate registered users. This data consists of:</p> <p>This website uses browser cookies to authenticate registered users. This data consists of:</p>

View File

@ -14,7 +14,7 @@
<div class="pure-control-group"> <div class="pure-control-group">
<label for="import_youtube"> <label for="import_youtube">
<a rel="noopener" target="_blank" href="https://github.com/iv-org/documentation/blob/master/docs/export-youtube-subscriptions.md"> <a rel="noopener noreferrer" target="_blank" href="https://github.com/iv-org/documentation/blob/master/docs/export-youtube-subscriptions.md">
<%= translate(locale, "Import YouTube subscriptions") %> <%= translate(locale, "Import YouTube subscriptions") %>
</a> </a>
</label> </label>

View File

@ -208,6 +208,11 @@
<input name="automatic_instance_redirect" id="automatic_instance_redirect" type="checkbox" <% if preferences.automatic_instance_redirect %>checked<% end %>> <input name="automatic_instance_redirect" id="automatic_instance_redirect" type="checkbox" <% if preferences.automatic_instance_redirect %>checked<% end %>>
</div> </div>
<div class="pure-control-group">
<label for="include_youtube_links"><%= translate(locale, "preferences_include_youtube_links_label") %></label>
<input name="include_youtube_links" id="include_youtube_links" type="checkbox" <% if preferences.include_youtube_links %>checked<% end %>>
</div>
<% if env.get? "user" %> <% if env.get? "user" %>
<legend><%= translate(locale, "preferences_category_subscription") %></legend> <legend><%= translate(locale, "preferences_category_subscription") %></legend>

View File

@ -112,20 +112,22 @@ we're going to need to do it here in order to allow for translations.
<div class="pure-g"> <div class="pure-g">
<div class="pure-u-1 pure-u-lg-1-5"> <div class="pure-u-1 pure-u-lg-1-5">
<div class="h-box"> <div class="h-box">
<span id="watch-on-youtube"> <%- if env.get("preferences").as(Preferences).include_youtube_links -%>
<%- <span id="watch-on-youtube">
link_yt_watch = URI.new(scheme: "https", host: "www.youtube.com", path: "/watch", query: "v=#{video.id}") <%-
link_yt_embed = URI.new(scheme: "https", host: "www.youtube.com", path: "/embed/#{video.id}") link_yt_watch = URI.new(scheme: "https", host: "www.youtube.com", path: "/watch", query: "v=#{video.id}")
link_yt_embed = URI.new(scheme: "https", host: "www.youtube.com", path: "/embed/#{video.id}")
if !plid.nil? && !continuation.nil? if !plid.nil? && !continuation.nil?
link_yt_param = URI::Params{"list" => [plid], "index" => [continuation.to_s]} link_yt_param = URI::Params{"list" => [plid], "index" => [continuation.to_s]}
link_yt_watch = IV::HttpServer::Utils.add_params_to_url(link_yt_watch, link_yt_param) link_yt_watch = IV::HttpServer::Utils.add_params_to_url(link_yt_watch, link_yt_param)
link_yt_embed = IV::HttpServer::Utils.add_params_to_url(link_yt_embed, link_yt_param) link_yt_embed = IV::HttpServer::Utils.add_params_to_url(link_yt_embed, link_yt_param)
end end
-%> -%>
<a id="link-yt-watch" rel="noreferrer noopener" data-base-url="<%= link_yt_watch %>" href="<%= link_yt_watch %>"><%= translate(locale, "videoinfo_watch_on_youTube") %></a> <a id="link-yt-watch" rel="noreferrer noopener" data-base-url="<%= link_yt_watch %>" href="<%= link_yt_watch %>"><%= translate(locale, "videoinfo_watch_on_youTube") %></a>
(<a id="link-yt-embed" rel="noreferrer noopener" data-base-url="<%= link_yt_embed %>" href="<%= link_yt_embed %>"><%= translate(locale, "videoinfo_youTube_embed_link") %></a>) (<a id="link-yt-embed" rel="noreferrer noopener" data-base-url="<%= link_yt_embed %>" href="<%= link_yt_embed %>"><%= translate(locale, "videoinfo_youTube_embed_link") %></a>)
</span> </span>
<%- end -%>
<p id="watch-on-another-invidious-instance"> <p id="watch-on-another-invidious-instance">
<%- link_iv_other = IV::Frontend::Misc.redirect_url(env) -%> <%- link_iv_other = IV::Frontend::Misc.redirect_url(env) -%>