mirror of
https://github.com/iv-org/invidious.git
synced 2025-07-20 12:28:29 +00:00
include youtube links setting
This commit is contained in:
parent
164d764d55
commit
7bcff627f8
@ -136,11 +136,14 @@ player.on('timeupdate', function () {
|
||||
let elem_yt_watch = document.getElementById('link-yt-watch');
|
||||
let elem_yt_embed = document.getElementById('link-yt-embed');
|
||||
|
||||
// YT links could be turned off by the user
|
||||
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_embed.href = addCurrentTimeToURL(base_url_yt_embed);
|
||||
}
|
||||
|
||||
// Invidious links
|
||||
|
||||
@ -174,7 +177,7 @@ var shareOptions = {
|
||||
};
|
||||
|
||||
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({
|
||||
overlays: [
|
||||
{ start: 'loadstart', content: overlay_content, end: 'playing', align: 'top'},
|
||||
|
@ -141,7 +141,7 @@ function get_reddit_comments() {
|
||||
</b> \
|
||||
</p> \
|
||||
<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> \
|
||||
</div> \
|
||||
<div>{contentHtml}</div> \
|
||||
|
@ -938,6 +938,20 @@ default_user_preferences:
|
||||
##
|
||||
#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',
|
||||
## only the first few lines of the description are shown and a
|
||||
|
@ -73,6 +73,7 @@
|
||||
"preferences_thin_mode_label": "الوضع الخفيف: ",
|
||||
"preferences_category_misc": "تفضيلات متنوعة",
|
||||
"preferences_automatic_instance_redirect_label": "إعادة توجيه المثيل التلقائي (إعادة التوجيه إلى redirect.invidious.io): ",
|
||||
"preferences_include_youtube_links_label": "عرض روابط إعادة التوجيه على يوتيوب: ",
|
||||
"preferences_category_subscription": "تفضيلات الاشتراك",
|
||||
"preferences_annotations_subscribed_label": "عرض الملاحظات في الفيديوهات تلقائيا في القنوات المشترك بها فقط: ",
|
||||
"Redirect homepage to feed: ": "إعادة التوجية من الصفحة الرئيسية لصفحة المشتركين (لرؤية اخر فيديوهات المشتركين): ",
|
||||
|
@ -445,6 +445,7 @@
|
||||
"source": "източник",
|
||||
"Fallback comments: ": "Резервни коментари: ",
|
||||
"preferences_automatic_instance_redirect_label": "Автоматично препращане на инстанция (чрез redirect.invidious.io): ",
|
||||
"preferences_include_youtube_links_label": "Покажете пренасочващите връзки на YouTube: ",
|
||||
"Maori": "Маори",
|
||||
"generic_button_delete": "Изтрий",
|
||||
"Import YouTube playlist (.csv)": "Импортиране на YouTube плейлист (.csv)",
|
||||
|
@ -140,6 +140,7 @@
|
||||
"Default": "Per defecte",
|
||||
"Amharic": "Amàric",
|
||||
"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ó: ",
|
||||
"Registration enabled: ": "Activa registre: ",
|
||||
"Whitelisted regions: ": "Regions a la llista blanca: ",
|
||||
|
@ -422,6 +422,7 @@
|
||||
"Erroneous CAPTCHA": "Chybná CAPTCHA",
|
||||
"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_include_youtube_links_label": "Zobrazit přesměrovací odkazy na YouTube: ",
|
||||
"Switch Invidious Instance": "Přepnout instanci Invidious",
|
||||
"Empty playlist": "Prázdný playlist",
|
||||
"footer_source_code": "Zdrojový kód",
|
||||
|
@ -289,6 +289,7 @@
|
||||
"Dutch": "Hollandsk",
|
||||
"Estonian": "Estisk",
|
||||
"preferences_automatic_instance_redirect_label": "Automatisk eksempel omdirigering (Fallback til redirect.invidious.io): ",
|
||||
"preferences_include_youtube_links_label": "Vis YouTube-omdirigeringslinks: ",
|
||||
"Nepali": "Nepalesisk",
|
||||
"Norwegian Bokmål": "Norsk Bokmål",
|
||||
"(edited)": "(ændret)",
|
||||
|
@ -74,6 +74,7 @@
|
||||
"preferences_thin_mode_label": "Schlanker Modus: ",
|
||||
"preferences_category_misc": "Sonstige Einstellungen",
|
||||
"preferences_automatic_instance_redirect_label": "Automatische Instanzweiterleitung (über redirect.invidious.io): ",
|
||||
"preferences_include_youtube_links_label": "Zeige YouTube-Weiterleitungslinks: ",
|
||||
"preferences_category_subscription": "Abonnementeinstellungen",
|
||||
"preferences_annotations_subscribed_label": "Anmerkungen für abonnierte Kanäle standardmäßig anzeigen? ",
|
||||
"Redirect homepage to feed: ": "Startseite zu Feed umleiten: ",
|
||||
|
@ -481,6 +481,7 @@
|
||||
"error_video_not_in_playlist": "Το αιτούμενο βίντεο δεν υπάρχει στη δεδομένη λίστα αναπαραγωγής. <a href=\"`x`\">Πατήστε εδώ για επιστροφή στη κεντρική σελίδα λιστών αναπαραγωγής.</a>",
|
||||
"search_filters_duration_option_none": "Οποιαδήποτε διάρκεια",
|
||||
"preferences_automatic_instance_redirect_label": "Αυτόματη ανακατεύθυνση instance (εναλλακτική σε redirect.invidious.io): ",
|
||||
"preferences_include_youtube_links_label": "Εμφάνιση συνδέσμων ανακατεύθυνσης YouTube: ",
|
||||
"generic_button_delete": "Διαγραφή",
|
||||
"Import YouTube playlist (.csv)": "Εισαγωγή λίστας αναπαραγωγής YouTube (.csv)",
|
||||
"Switch Invidious Instance": "Αλλαγή Instance Invidious",
|
||||
|
@ -118,6 +118,7 @@
|
||||
"preferences_thin_mode_label": "Thin mode: ",
|
||||
"preferences_category_misc": "Miscellaneous preferences",
|
||||
"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_annotations_subscribed_label": "Show annotations by default for subscribed channels? ",
|
||||
"Redirect homepage to feed: ": "Redirect homepage to feed: ",
|
||||
|
@ -73,6 +73,7 @@
|
||||
"preferences_thin_mode_label": "Maldika reĝimo: ",
|
||||
"preferences_category_misc": "Aliaj agordoj",
|
||||
"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_annotations_subscribed_label": "Ĉu montri prinotojn defaŭlte por abonitaj kanaloj? ",
|
||||
"Redirect homepage to feed: ": "Alidirekti hejmpâgon al fluo: ",
|
||||
|
@ -73,6 +73,7 @@
|
||||
"preferences_thin_mode_label": "Modo compacto: ",
|
||||
"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_include_youtube_links_label": "Mostrar enlaces de redirección de YouTube: ",
|
||||
"preferences_category_subscription": "Preferencias de la suscripción",
|
||||
"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: ",
|
||||
|
@ -200,6 +200,7 @@
|
||||
"preferences_category_data": "Dataren lehentasunak",
|
||||
"preferences_default_home_label": "Homepage lehenetsia: ",
|
||||
"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",
|
||||
"published - reverse": "argitaratuta - alderantziz",
|
||||
"Could not get channel info.": "Kanalaren adierazpena ezin lortu.",
|
||||
|
@ -83,6 +83,7 @@
|
||||
"preferences_thin_mode_label": "حالت نازک: ",
|
||||
"preferences_category_misc": "ترجیحات متفرقه",
|
||||
"preferences_automatic_instance_redirect_label": "هدایت خودکار نمونه (انتقال به redirect.invidious.io): ",
|
||||
"preferences_include_youtube_links_label": "نمایش لینکهای ریدایرکت یوتیوب: ",
|
||||
"preferences_category_subscription": "ترجیحات اشتراک",
|
||||
"preferences_annotations_subscribed_label": "نمایش حاشیه نویسی ها به طور پیشفرض برای کانال های مشترک شده: ",
|
||||
"Redirect homepage to feed: ": "تغییر مسیر صفحه خانه به خوراک: ",
|
||||
|
@ -73,6 +73,7 @@
|
||||
"preferences_thin_mode_label": "Kapea tila: ",
|
||||
"preferences_category_misc": "Sekalaiset asetukset",
|
||||
"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_annotations_subscribed_label": "Näytä oletuksena tilattujen kanavien huomautukset: ",
|
||||
"Redirect homepage to feed: ": "Uudelleenohjaa kotisivu syötteeseen: ",
|
||||
|
@ -96,6 +96,7 @@
|
||||
"preferences_thin_mode_label": "Mode léger : ",
|
||||
"preferences_category_misc": "Paramètres divers",
|
||||
"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_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 : ",
|
||||
|
@ -130,6 +130,7 @@
|
||||
"preferences_thin_mode_label": "हल्का मोड: ",
|
||||
"preferences_category_misc": "विविध प्राथमिकताएँ",
|
||||
"preferences_automatic_instance_redirect_label": "अपने आप अनुप्रेषित करें (redirect.invidious.io पर फ़ॉलबैक करें): ",
|
||||
"preferences_include_youtube_links_label": "यूट्यूब रीडायरेक्ट लिंक दिखाएं: ",
|
||||
"preferences_category_subscription": "सदस्यताओं की प्राथमिकताएँ",
|
||||
"preferences_annotations_subscribed_label": "सदस्यता लिए गए चैनलों पर डिफ़ॉल्ट से टिप्पणियाँ दिखाएँ? ",
|
||||
"Redirect homepage to feed: ": "फ़ीड पर मुखपृष्ठ को अनुप्रेषित करें: ",
|
||||
|
@ -73,6 +73,7 @@
|
||||
"preferences_thin_mode_label": "Pojednostavljen prikaz: ",
|
||||
"preferences_category_misc": "Razne postavke",
|
||||
"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_annotations_subscribed_label": "Standardno prikaži napomene za pretplaćene kanale: ",
|
||||
"Redirect homepage to feed: ": "Preusmjeri početnu stranicu na feed: ",
|
||||
|
@ -388,6 +388,7 @@
|
||||
"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:",
|
||||
"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: ",
|
||||
"search_filters_sort_option_relevance": "Relevancia",
|
||||
"search_filters_sort_option_rating": "Pontszám",
|
||||
|
@ -78,6 +78,7 @@
|
||||
"preferences_thin_mode_label": "Mode tipis: ",
|
||||
"preferences_category_misc": "Preferensi lainnya",
|
||||
"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_annotations_subscribed_label": "Tampilkan anotasi secara baku untuk kanal yang dilanggan? ",
|
||||
"Redirect homepage to feed: ": "Arahkan kembali laman beranda ke umpan: ",
|
||||
|
@ -460,6 +460,7 @@
|
||||
"preferences_quality_option_small": "Lítið",
|
||||
"preferences_category_misc": "Ýmsar kjörstillingar",
|
||||
"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 (Brazil)": "Portúgalska (Brasilía)",
|
||||
"generic_button_edit": "Breyta",
|
||||
|
@ -411,6 +411,7 @@
|
||||
"download_subtitles": "Sottotitoli - `x` (.vtt)",
|
||||
"user_saved_playlists": "playlist salvate da `x`",
|
||||
"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",
|
||||
"preferences_show_nick_label": "Mostra nickname in alto: ",
|
||||
"videoinfo_youTube_embed_link": "Incorpora",
|
||||
|
@ -78,6 +78,7 @@
|
||||
"preferences_thin_mode_label": "最小モード: ",
|
||||
"preferences_category_misc": "ほかの設定",
|
||||
"preferences_automatic_instance_redirect_label": "インスタンスの自動転送 (redirect.invidious.ioにフォールバック): ",
|
||||
"preferences_include_youtube_links_label": "YouTubeのリダイレクトリンクを表示する: ",
|
||||
"preferences_category_subscription": "登録チャンネル設定",
|
||||
"preferences_annotations_subscribed_label": "最初から登録チャンネルのアノテーションを表示 ",
|
||||
"Redirect homepage to feed: ": "ホームからフィードにリダイレクト: ",
|
||||
|
@ -5,6 +5,7 @@
|
||||
"preferences_annotations_subscribed_label": "구독한 채널에 기본으로 주석 표시: ",
|
||||
"preferences_category_subscription": "구독 설정",
|
||||
"preferences_automatic_instance_redirect_label": "자동 인스턴스 리디렉션 (redirect.invidious.io로 대체): ",
|
||||
"preferences_include_youtube_links_label": "YouTube 리디렉션 링크 표시: ",
|
||||
"preferences_thin_mode_label": "단순 모드: ",
|
||||
"light": "라이트",
|
||||
"dark": "다크",
|
||||
|
@ -191,6 +191,7 @@
|
||||
"preferences_dark_mode_label": "Tema: ",
|
||||
"preferences_thin_mode_label": "Modalità legera: ",
|
||||
"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",
|
||||
"Show annotations": "Mostra le notazioni",
|
||||
"Family friendly? ": "Adàt a tüti? ",
|
||||
|
@ -73,6 +73,7 @@
|
||||
"preferences_thin_mode_label": "Sugretintas rėžimas: ",
|
||||
"preferences_category_misc": "Įvairios nuostatos",
|
||||
"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_annotations_subscribed_label": "Prenumeruojamiems kanalams subtitrus rodyti pagal nutylėjimą: ",
|
||||
"Redirect homepage to feed: ": "Peradresuoti pagrindinį puslapį į kanalų sąrašą: ",
|
||||
|
@ -73,6 +73,7 @@
|
||||
"preferences_thin_mode_label": "Tynt modus: ",
|
||||
"preferences_category_misc": "Ulike innstillinger",
|
||||
"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_annotations_subscribed_label": "Vis merknader som forvalg for kanaler det abonneres på? ",
|
||||
"Redirect homepage to feed: ": "Videresend hjemmeside til kilde: ",
|
||||
|
@ -344,6 +344,7 @@
|
||||
"Current version: ": "Huidige versie: ",
|
||||
"Switch Invidious Instance": "Schakel tussen de Invidious Instanties",
|
||||
"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_region_label": "Inhoud land: ",
|
||||
"preferences_category_misc": "Diverse voorkeuren",
|
||||
|
@ -73,6 +73,7 @@
|
||||
"preferences_thin_mode_label": "Tryb minimalny: ",
|
||||
"preferences_category_misc": "Różne preferencje",
|
||||
"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_annotations_subscribed_label": "Domyślnie wyświetlaj adnotacje dla subskrybowanych kanałów: ",
|
||||
"Redirect homepage to feed: ": "Przekieruj stronę główną do subskrybcji: ",
|
||||
|
@ -73,6 +73,7 @@
|
||||
"preferences_thin_mode_label": "Modo compacto: ",
|
||||
"preferences_category_misc": "Preferências diversas",
|
||||
"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_annotations_subscribed_label": "Mostrar anotações por padrão para canais inscritos? ",
|
||||
"Redirect homepage to feed: ": "Redirecionar página inicial para o feed: ",
|
||||
|
@ -73,6 +73,7 @@
|
||||
"preferences_thin_mode_label": "Modo compacto: ",
|
||||
"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_include_youtube_links_label": "Mostrar links de redirecionamento do YouTube: ",
|
||||
"preferences_category_subscription": "Preferências de subscrições",
|
||||
"preferences_annotations_subscribed_label": "Mostrar sempre anotações aos canais subscritos: ",
|
||||
"Redirect homepage to feed: ": "Redirecionar página inicial para subscrições: ",
|
||||
|
@ -10,6 +10,7 @@
|
||||
"Released under the AGPLv3 on Github.": "Disponibilizada sob a AGPLv3 no GitHub.",
|
||||
"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_include_youtube_links_label": "Mostrar links de redirecionamento do YouTube: ",
|
||||
"preferences_category_misc": "Preferências diversas",
|
||||
"preferences_vr_mode_label": "Vídeos interativos de 360 graus (requer WebGL): ",
|
||||
"preferences_extend_desc_label": "Expandir automaticamente a descrição do vídeo: ",
|
||||
|
@ -372,6 +372,7 @@
|
||||
"preferences_quality_dash_option_1080p": "1080p",
|
||||
"preferences_category_misc": "Setări diverse",
|
||||
"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_option_medium": "Medie",
|
||||
"Switch Invidious Instance": "Schimbă instanța Invidious",
|
||||
|
@ -73,6 +73,7 @@
|
||||
"preferences_thin_mode_label": "Облегчённое оформление: ",
|
||||
"preferences_category_misc": "Прочие настройки",
|
||||
"preferences_automatic_instance_redirect_label": "Автоматическая смена зеркала (переход на redirect.invidious.io): ",
|
||||
"preferences_include_youtube_links_label": "Показать ссылки перенаправления на YouTube: ",
|
||||
"preferences_category_subscription": "Настройки подписок",
|
||||
"preferences_annotations_subscribed_label": "Всегда показывать аннотации на каналах из ваших подписок? ",
|
||||
"Redirect homepage to feed: ": "Показывать подписки на главной странице: ",
|
||||
|
@ -54,6 +54,7 @@
|
||||
"light": "svetla",
|
||||
"preferences_thin_mode_label": "Tanki način: ",
|
||||
"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? ",
|
||||
"Redirect homepage to feed: ": "Preusmeri domačo stran na vir: ",
|
||||
"preferences_max_results_label": "Število videoposnetkov, prikazanih v viru: ",
|
||||
|
@ -87,6 +87,7 @@
|
||||
"preferences_thin_mode_label": "Mënyrë e hollë: ",
|
||||
"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_include_youtube_links_label": "Trego lidhjet e ridrejtimit të YouTube: ",
|
||||
"preferences_category_subscription": "Parapëlqime pajtimesh",
|
||||
"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: ",
|
||||
|
@ -155,6 +155,7 @@
|
||||
"preferences_thin_mode_label": "Kompaktni režim: ",
|
||||
"preferences_category_misc": "Ostala podešavanja",
|
||||
"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",
|
||||
"Enable web notifications": "Omogući veb obaveštenja",
|
||||
"`x` is live": "`x` je uživo",
|
||||
|
@ -317,6 +317,7 @@
|
||||
"Released under the AGPLv3 on Github.": "Објављено под лиценцом AGPLv3 на GitHub-у.",
|
||||
"Afrikaans": "Африканс",
|
||||
"preferences_automatic_instance_redirect_label": "Аутоматско преусмеравање инстанце (повратак на redirect.invidious.io): ",
|
||||
"preferences_include_youtube_links_label": "Прикажи линкове за преусмеравање на YouTube-у: ",
|
||||
"Please log in": "Молимо, пријавите се",
|
||||
"English (auto-generated)": "Енглески (аутоматски генерисано)",
|
||||
"Hindi": "Хинди",
|
||||
|
@ -476,6 +476,7 @@
|
||||
"preferences_quality_dash_option_240p": "240p",
|
||||
"Chinese": "Kinesiska",
|
||||
"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",
|
||||
"Import YouTube playlist (.csv)": "Importera YouTube spellista (.csv)",
|
||||
"next_steps_error_message": "Därefter bör du försöka: ",
|
||||
|
@ -73,6 +73,7 @@
|
||||
"preferences_thin_mode_label": "İnce Mod: ",
|
||||
"preferences_category_misc": "Çeşitli Tercihler",
|
||||
"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_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: ",
|
||||
|
@ -415,6 +415,7 @@
|
||||
"preferences_quality_option_hd720": "HD720",
|
||||
"preferences_quality_dash_option_2160p": "2160p",
|
||||
"preferences_automatic_instance_redirect_label": "Автоматична зміна сервера (redirect.invidious.io як резерв): ",
|
||||
"preferences_include_youtube_links_label": "Показати посилання на перенаправлення YouTube: ",
|
||||
"Switch Invidious Instance": "Інший сервер Invidious",
|
||||
"preferences_quality_dash_option_480p": "480p",
|
||||
"Chinese (Taiwan)": "Китайська (Тайвань)",
|
||||
|
@ -75,6 +75,7 @@
|
||||
"preferences_thin_mode_label": "Chế độ mỏng: ",
|
||||
"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_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_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: ",
|
||||
|
@ -78,6 +78,7 @@
|
||||
"preferences_thin_mode_label": "窄页模式: ",
|
||||
"preferences_category_misc": "其他选项",
|
||||
"preferences_automatic_instance_redirect_label": "自动实例重定向 (回退到redirect.invidious.io): ",
|
||||
"preferences_include_youtube_links_label": "显示YouTube重定向链接: ",
|
||||
"preferences_category_subscription": "订阅设置",
|
||||
"preferences_annotations_subscribed_label": "默认情况下显示已订阅频道的注释: ",
|
||||
"Redirect homepage to feed: ": "跳转主页到 feed: ",
|
||||
|
@ -78,6 +78,7 @@
|
||||
"preferences_thin_mode_label": "精簡模式: ",
|
||||
"preferences_category_misc": "其他偏好設定",
|
||||
"preferences_automatic_instance_redirect_label": "自動站台重新導向(汰退至 redirect.invidious.io): ",
|
||||
"preferences_include_youtube_links_label": "顯示YouTube重定向連結: ",
|
||||
"preferences_category_subscription": "訂閱偏好設定",
|
||||
"preferences_annotations_subscribed_label": "預設為已訂閱的頻道顯示註釋: ",
|
||||
"Redirect homepage to feed: ": "重新導向首頁至 feed: ",
|
||||
|
@ -1,7 +1,7 @@
|
||||
private IMAGE_QUALITIES = {320, 560, 640, 1280, 2000}
|
||||
|
||||
# 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?
|
||||
# Egljb21tdW5pdHk%3D is the protobuf object to load "community"
|
||||
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
|
||||
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
|
||||
|
||||
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 = {
|
||||
"2:string" => "community",
|
||||
"25:embedded" => {
|
||||
@ -47,10 +47,10 @@ def fetch_channel_community_post(ucid, post_id, locale, format, thin_mode)
|
||||
items << item
|
||||
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
|
||||
|
||||
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"]?
|
||||
error_message = (message["text"]["simpleText"]? ||
|
||||
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"
|
||||
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|
|
||||
json.object do
|
||||
|
@ -1,7 +1,7 @@
|
||||
module Invidious::Comments
|
||||
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
|
||||
when nil, ""
|
||||
ctoken = Comments.produce_continuation(id, cursor: "", sort_by: sort_by)
|
||||
@ -13,7 +13,7 @@ module Invidious::Comments
|
||||
|
||||
client_config = YoutubeAPI::ClientConfig.new(region: region)
|
||||
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
|
||||
|
||||
def fetch_community_post_comments(ucid, post_id)
|
||||
@ -57,7 +57,7 @@ module Invidious::Comments
|
||||
return initial_data
|
||||
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
|
||||
|
||||
if on_response_received_endpoints = response["onResponseReceivedEndpoints"]?
|
||||
@ -302,7 +302,7 @@ module Invidious::Comments
|
||||
|
||||
if format == "html"
|
||||
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|
|
||||
json.object do
|
||||
json.field "contentHtml", content_html
|
||||
|
@ -33,6 +33,7 @@ struct ConfigPreferences
|
||||
property default_home : String? = "Popular"
|
||||
property feed_menu : Array(String) = ["Popular", "Trending", "Subscriptions", "Playlists"]
|
||||
property automatic_instance_redirect : Bool = false
|
||||
property include_youtube_links : Bool = true
|
||||
property region : String = "US"
|
||||
property related_videos : Bool = true
|
||||
property sort : String = "published"
|
||||
|
@ -1,7 +1,7 @@
|
||||
module Invidious::Frontend::Comments
|
||||
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|
|
||||
root = comments["comments"].as_a
|
||||
root.each do |child|
|
||||
@ -147,6 +147,7 @@ module Invidious::Frontend::Comments
|
||||
|
|
||||
END_HTML
|
||||
|
||||
if include_youtube_links
|
||||
if comments["videoId"]?
|
||||
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>
|
||||
@ -158,6 +159,7 @@ module Invidious::Frontend::Comments
|
||||
|
|
||||
END_HTML
|
||||
end
|
||||
end
|
||||
|
||||
html << <<-END_HTML
|
||||
<i class="icon ion-ios-thumbs-up"></i> #{number_with_separator(child["likeCount"])}
|
||||
|
@ -182,7 +182,7 @@ def error_redirect_helper(env : HTTP::Server::Context)
|
||||
go_to_youtube = translate(locale, "next_steps_error_message_go_to_youtube")
|
||||
switch_instance = translate(locale, "Switch Invidious Instance")
|
||||
|
||||
return <<-END_HTML
|
||||
html = return <<-END_HTML
|
||||
<p style="margin-bottom: 4px;">#{next_steps_text}</p>
|
||||
<ul>
|
||||
<li>
|
||||
@ -191,11 +191,21 @@ def error_redirect_helper(env : HTTP::Server::Context)
|
||||
<li>
|
||||
<a href="/redirect?referer=#{env.get("current_page")}">#{switch_instance}</a>
|
||||
</li>
|
||||
END_HTML
|
||||
|
||||
if env.get("preferences").as(Preferences).include_youtube_links
|
||||
html += <<-END_HTML
|
||||
<li>
|
||||
<a rel="noreferrer noopener" href="https://youtube.com#{env.request.resource}">#{go_to_youtube}</a>
|
||||
</li>
|
||||
END_HTML
|
||||
end
|
||||
|
||||
html += <<-END_HTML
|
||||
</ul>
|
||||
END_HTML
|
||||
|
||||
return html
|
||||
else
|
||||
return ""
|
||||
end
|
||||
|
@ -370,6 +370,7 @@ module Invidious::Routes::API::V1::Channels
|
||||
|
||||
def self.community(env)
|
||||
locale = env.get("preferences").as(Preferences).locale
|
||||
include_youtube_links = env.get("preferences").as(Preferences).include_youtube_links
|
||||
|
||||
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
|
||||
|
||||
begin
|
||||
fetch_channel_community(ucid, continuation, locale, format, thin_mode)
|
||||
fetch_channel_community(ucid, continuation, locale, format, thin_mode, include_youtube_links)
|
||||
rescue ex
|
||||
return error_json(500, ex)
|
||||
end
|
||||
@ -393,6 +394,7 @@ module Invidious::Routes::API::V1::Channels
|
||||
|
||||
def self.post(env)
|
||||
locale = env.get("preferences").as(Preferences).locale
|
||||
include_youtube_links = env.get("preferences").as(Preferences).include_youtube_links
|
||||
|
||||
env.response.content_type = "application/json"
|
||||
id = env.params.url["id"].to_s
|
||||
@ -413,7 +415,7 @@ module Invidious::Routes::API::V1::Channels
|
||||
end
|
||||
|
||||
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
|
||||
return error_json(500, ex)
|
||||
end
|
||||
@ -421,6 +423,7 @@ module Invidious::Routes::API::V1::Channels
|
||||
|
||||
def self.post_comments(env)
|
||||
locale = env.get("preferences").as(Preferences).locale
|
||||
include_youtube_links = env.get("preferences").as(Preferences).include_youtube_links
|
||||
|
||||
env.response.content_type = "application/json"
|
||||
|
||||
@ -441,7 +444,7 @@ module Invidious::Routes::API::V1::Channels
|
||||
else
|
||||
comments = YoutubeAPI.browse(continuation: continuation)
|
||||
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
|
||||
|
||||
def self.channels(env)
|
||||
|
@ -320,6 +320,7 @@ module Invidious::Routes::API::V1::Videos
|
||||
|
||||
def self.comments(env)
|
||||
locale = env.get("preferences").as(Preferences).locale
|
||||
include_youtube_links = env.get("preferences").as(Preferences).include_youtube_links
|
||||
region = env.params.query["region"]?
|
||||
|
||||
env.response.content_type = "application/json"
|
||||
@ -345,7 +346,7 @@ module Invidious::Routes::API::V1::Videos
|
||||
sort_by ||= "top"
|
||||
|
||||
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
|
||||
return error_json(404, ex)
|
||||
rescue ex
|
||||
|
@ -212,6 +212,8 @@ module Invidious::Routes::Channels
|
||||
thin_mode = env.params.query["thin_mode"]? || env.get("preferences").as(Preferences).thin_mode
|
||||
thin_mode = thin_mode == "true"
|
||||
|
||||
include_youtube_links = env.get("preferences").as(Preferences).include_youtube_links
|
||||
|
||||
continuation = env.params.query["continuation"]?
|
||||
|
||||
if !channel.tabs.includes? "community"
|
||||
@ -223,7 +225,7 @@ module Invidious::Routes::Channels
|
||||
sort_options = [] of String
|
||||
|
||||
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
|
||||
env.response.status_code = 500
|
||||
error_message = ex.message
|
||||
@ -245,6 +247,7 @@ module Invidious::Routes::Channels
|
||||
prefs = env.get("preferences").as(Preferences)
|
||||
|
||||
locale = prefs.locale
|
||||
include_youtube_links = prefs.include_youtube_links
|
||||
|
||||
thin_mode = env.params.query["thin_mode"]? || prefs.thin_mode
|
||||
thin_mode = thin_mode == "true"
|
||||
@ -256,21 +259,19 @@ module Invidious::Routes::Channels
|
||||
|
||||
if !ucid.nil?
|
||||
ucid = ucid.to_s
|
||||
post_response = fetch_channel_community_post(ucid, id, locale, "json", thin_mode)
|
||||
else
|
||||
# resolve the url to get the author's UCID
|
||||
response = YoutubeAPI.resolve_url("https://www.youtube.com/post/#{id}")
|
||||
return error_template(400, "Invalid post ID") if response["error"]?
|
||||
|
||||
ucid = response.dig("endpoint", "browseEndpoint", "browseId").as_s
|
||||
post_response = fetch_channel_community_post(ucid, id, locale, "json", thin_mode)
|
||||
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
|
||||
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
|
||||
templated "post"
|
||||
end
|
||||
|
@ -114,6 +114,10 @@ module Invidious::Routes::PreferencesRoute
|
||||
automatic_instance_redirect ||= "off"
|
||||
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)
|
||||
|
||||
locale = env.params.body["locale"]?.try &.as(String)
|
||||
@ -168,6 +172,7 @@ module Invidious::Routes::PreferencesRoute
|
||||
default_home: default_home,
|
||||
feed_menu: feed_menu,
|
||||
automatic_instance_redirect: automatic_instance_redirect,
|
||||
include_youtube_links: include_youtube_links,
|
||||
region: region,
|
||||
related_videos: related_videos,
|
||||
sort: sort,
|
||||
|
@ -2,8 +2,12 @@
|
||||
|
||||
module Invidious::Routes::Watch
|
||||
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"]?
|
||||
include_youtube_links = preferences.include_youtube_links
|
||||
|
||||
if env.params.query.to_s.includes?("%20") || env.params.query.to_s.includes?("+")
|
||||
url = "/watch?" + env.params.query.to_s.gsub("%20", "").delete("+")
|
||||
@ -38,8 +42,6 @@ module Invidious::Routes::Watch
|
||||
nojs ||= "0"
|
||||
nojs = nojs == "1"
|
||||
|
||||
preferences = env.get("preferences").as(Preferences)
|
||||
|
||||
user = env.get?("user").try &.as(User)
|
||||
if user
|
||||
subscriptions = user.subscriptions
|
||||
@ -87,7 +89,7 @@ module Invidious::Routes::Watch
|
||||
|
||||
if source == "youtube"
|
||||
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
|
||||
if preferences.comments[1] == "reddit"
|
||||
comments, reddit_thread = Comments.fetch_reddit(id)
|
||||
@ -106,12 +108,12 @@ module Invidious::Routes::Watch
|
||||
comment_html = Comments.replace_links(comment_html)
|
||||
rescue ex
|
||||
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
|
||||
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
|
||||
|
||||
comment_html ||= ""
|
||||
|
@ -7,6 +7,7 @@ struct Preferences
|
||||
property preload : Bool = CONFIG.default_user_preferences.preload
|
||||
property autoplay : Bool = CONFIG.default_user_preferences.autoplay
|
||||
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)]
|
||||
@[YAML::Field(converter: Preferences::StringToArray)]
|
||||
|
@ -27,7 +27,7 @@
|
||||
</div>
|
||||
<% else %>
|
||||
<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>
|
||||
<% end %>
|
||||
|
||||
|
@ -36,9 +36,12 @@
|
||||
|
||||
<div class="pure-g h-box">
|
||||
<div class="pure-u-1-2">
|
||||
<% if env.get("preferences").as(Preferences).include_youtube_links%>
|
||||
<div class="pure-u-1 pure-md-1-3">
|
||||
<a href="<%= youtube_url %>"><%= translate(locale, "View channel on YouTube") %></a>
|
||||
<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">
|
||||
<a href="<%= redirect_url %>"><%= translate(locale, "Switch Invidious Instance") %></a>
|
||||
</div>
|
||||
|
@ -1,8 +1,11 @@
|
||||
<div class="flex-right flexible">
|
||||
<div class="icon-buttons">
|
||||
<% if env.get("preferences").as(Preferences).include_youtube_links%>
|
||||
<a title="<%=translate(locale, "videoinfo_watch_on_youTube")%>" rel="noreferrer noopener" href="https://www.youtube.com/watch<%=endpoint_params%>">
|
||||
<i class="icon ion-logo-youtube"></i>
|
||||
</a>
|
||||
<% end %>
|
||||
|
||||
<a title="<%=translate(locale, "Audio mode")%>" href="/watch<%=endpoint_params%>&listen=1">
|
||||
<i class="icon ion-md-headset"></i>
|
||||
</a>
|
||||
|
@ -83,10 +83,12 @@
|
||||
|
||||
<% if !playlist.is_a? InvidiousPlaylist %>
|
||||
<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 %>">
|
||||
<%= translate(locale, "View playlist on YouTube") %>
|
||||
</a>
|
||||
<span> | </span>
|
||||
<% end %>
|
||||
|
||||
<% if env.get("preferences").as(Preferences).automatic_instance_redirect%>
|
||||
<a href="/redirect?referer=<%= env.get?("current_page") %>">
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
<div>
|
||||
<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>
|
||||
|
||||
<% if nojs %>
|
||||
|
@ -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: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 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>
|
||||
<p>This website uses browser cookies to authenticate registered users. This data consists of:</p>
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
<div class="pure-control-group">
|
||||
<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") %>
|
||||
</a>
|
||||
</label>
|
||||
|
@ -208,6 +208,11 @@
|
||||
<input name="automatic_instance_redirect" id="automatic_instance_redirect" type="checkbox" <% if preferences.automatic_instance_redirect %>checked<% end %>>
|
||||
</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" %>
|
||||
<legend><%= translate(locale, "preferences_category_subscription") %></legend>
|
||||
|
||||
|
@ -112,6 +112,7 @@ we're going to need to do it here in order to allow for translations.
|
||||
<div class="pure-g">
|
||||
<div class="pure-u-1 pure-u-lg-1-5">
|
||||
<div class="h-box">
|
||||
<%- 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}")
|
||||
@ -126,6 +127,7 @@ we're going to need to do it here in order to allow for translations.
|
||||
<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>)
|
||||
</span>
|
||||
<%- end -%>
|
||||
|
||||
<p id="watch-on-another-invidious-instance">
|
||||
<%- link_iv_other = IV::Frontend::Misc.redirect_url(env) -%>
|
||||
|
Loading…
Reference in New Issue
Block a user