mirror of
https://github.com/Shik3i/KoalaSync.git
synced 2026-08-28 03:27:10 +00:00
feat(website): add build-time minification and optimize meta descriptions
This commit is contained in:
+624
-657
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>KoalaSync | Netflix, YouTube & jedes Video mit Freunden synchronisieren</title>
|
||||
<meta name="description" content="Schaue Netflix, YouTube, Twitch und jedes HTML5-Video perfekt synchronisiert mit Freunden. Kostenlose, quelloffene Browser-Erweiterung für Chrome und Firefox. Keine Anmeldung erforderlich.">
|
||||
<meta name="description" content="Schaue Netflix, YouTube, Twitch und jedes HTML5-Video synchron mit Freunden. Kostenlose, quelloffene Browser-Erweiterung. Keine Anmeldung erforderlich.">
|
||||
|
||||
<link rel="preload" href="../style.css" as="style">
|
||||
<link rel="preload" as="image" href="../assets/LookDownKoala.webp" imagesrcset="../assets/LookDownKoala-1x.webp 90w, ../assets/LookDownKoala.webp 205w" imagesizes="90px" fetchpriority="high">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>KoalaSync | Sincroniza Netflix, YouTube y cualquier video con amigos</title>
|
||||
<meta name="description" content="Mira Netflix, YouTube, Twitch y cualquier video HTML5 en perfecta sincronización con amigos. Extensión de navegador gratuita y de código abierto para Chrome y Firefox. No se requiere registro.">
|
||||
<meta name="description" content="Mira Netflix, YouTube, Twitch y cualquier video HTML5 en perfecta sincronización con amigos. Extensión de navegador gratuita y de código abierto. Sin registro.">
|
||||
|
||||
<link rel="preload" href="../style.css" as="style">
|
||||
<link rel="preload" as="image" href="../assets/LookDownKoala.webp" imagesrcset="../assets/LookDownKoala-1x.webp 90w, ../assets/LookDownKoala.webp 205w" imagesizes="90px" fetchpriority="high">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>KoalaSync | Synchronisez Netflix, YouTube et n'importe quelle vidéo avec vos amis</title>
|
||||
<meta name="description" content="Regardez Netflix, YouTube, Twitch et n'importe quelle vidéo HTML5 en parfaite synchronisation avec vos amis. Extension de navigateur gratuite et open-source pour Chrome et Firefox. Aucune inscription requise.">
|
||||
<meta name="description" content="Regardez Netflix, YouTube, Twitch et des vidéos HTML5 en synchro avec vos amis. Extension de navigateur gratuite et open-source. Aucune inscription requise.">
|
||||
|
||||
<link rel="preload" href="../style.css" as="style">
|
||||
<link rel="preload" as="image" href="../assets/LookDownKoala.webp" imagesrcset="../assets/LookDownKoala-1x.webp 90w, ../assets/LookDownKoala.webp 205w" imagesizes="90px" fetchpriority="high">
|
||||
|
||||
+58
-63
@@ -1,74 +1,69 @@
|
||||
(function() {
|
||||
var html = document.documentElement;
|
||||
var path = window.location.pathname;
|
||||
var html = document.documentElement;
|
||||
var path = window.location.pathname;
|
||||
|
||||
// Mapping of browser language codes to KoalaSync locale directories
|
||||
var langMap = {
|
||||
'de': 'de',
|
||||
'fr': 'fr',
|
||||
'es': 'es',
|
||||
'pt': 'pt-BR',
|
||||
'ru': 'ru'
|
||||
};
|
||||
var langMap = {
|
||||
'de': 'de',
|
||||
'fr': 'fr',
|
||||
'es': 'es',
|
||||
'pt': 'pt-BR',
|
||||
'ru': 'ru'
|
||||
};
|
||||
|
||||
// Check if we are on the root index page (either "/" or "/index.html" at the root)
|
||||
var isRootIndex = path === '/' || path === '/index.html' || path === '';
|
||||
var isRootIndex = path === '/' || path === '/index.html' || path === '';
|
||||
|
||||
if (isRootIndex) {
|
||||
var savedLang = localStorage.getItem('koala_lang');
|
||||
var browserLang = navigator.language.split('-')[0];
|
||||
var preferredLang = savedLang || langMap[browserLang] || 'en';
|
||||
if (isRootIndex) {
|
||||
var savedLang = localStorage.getItem('koala_lang');
|
||||
var browserLang = navigator.language.split('-')[0];
|
||||
var preferredLang = savedLang || langMap[browserLang] || 'en';
|
||||
|
||||
if (preferredLang !== 'en') {
|
||||
window.location.replace(preferredLang + '/');
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (preferredLang !== 'en') {
|
||||
window.location.replace(preferredLang + '/');
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var htmlClasses = html.className.split(' ');
|
||||
var activeLang = null;
|
||||
var hasStaticLang = false;
|
||||
for (var i = 0; i < htmlClasses.length; i++) {
|
||||
if (htmlClasses[i].indexOf('lang-') === 0) {
|
||||
hasStaticLang = true;
|
||||
var langPart = htmlClasses[i].substring(5);
|
||||
activeLang = langPart === 'pt-br' ? 'pt-BR' : langPart;
|
||||
break;
|
||||
}
|
||||
}
|
||||
var htmlClasses = html.className.split(' ');
|
||||
var activeLang = null;
|
||||
var hasStaticLang = false;
|
||||
for (var i = 0; i < htmlClasses.length; i++) {
|
||||
if (htmlClasses[i].indexOf('lang-') === 0) {
|
||||
hasStaticLang = true;
|
||||
var langPart = htmlClasses[i].substring(5);
|
||||
activeLang = langPart === 'pt-br' ? 'pt-BR' : langPart;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (hasStaticLang) {
|
||||
localStorage.setItem('koala_lang', activeLang);
|
||||
} else {
|
||||
var savedLang = localStorage.getItem('koala_lang');
|
||||
var browserLang = navigator.language.split('-')[0];
|
||||
activeLang = savedLang || langMap[browserLang] || 'en';
|
||||
if (hasStaticLang) {
|
||||
localStorage.setItem('koala_lang', activeLang);
|
||||
} else {
|
||||
var savedLang = localStorage.getItem('koala_lang');
|
||||
var browserLang = navigator.language.split('-')[0];
|
||||
activeLang = savedLang || langMap[browserLang] || 'en';
|
||||
|
||||
// Dynamic utility pages currently only support English and German markup.
|
||||
// Fallback to English for any other language to avoid bilingual text duplication.
|
||||
if (activeLang !== 'de') {
|
||||
activeLang = 'en';
|
||||
}
|
||||
if (activeLang !== 'de') {
|
||||
activeLang = 'en';
|
||||
}
|
||||
|
||||
html.classList.add('lang-' + activeLang);
|
||||
html.lang = activeLang;
|
||||
}
|
||||
html.classList.add('lang-' + activeLang);
|
||||
html.lang = activeLang;
|
||||
}
|
||||
|
||||
// Update titles dynamically based on page
|
||||
var isIndex = path === '/' || path.endsWith('index.html') || path.split('/').pop() === '';
|
||||
var isJoin = path.includes('join');
|
||||
var isIndex = path === '/' || path.endsWith('index.html') || path.split('/').pop() === '';
|
||||
var isJoin = path.includes('join');
|
||||
|
||||
if (isIndex) {
|
||||
var titles = {
|
||||
en: 'KoalaSync | Real-time Video Synchronization for Friends',
|
||||
de: 'KoalaSync | Echtzeit-Video-Synchronisation für Freunde'
|
||||
};
|
||||
document.title = titles[activeLang] || titles.en;
|
||||
} else if (isJoin) {
|
||||
var titles = {
|
||||
en: 'Join Room | KoalaSync',
|
||||
de: 'Raum beitreten | KoalaSync'
|
||||
};
|
||||
document.title = titles[activeLang] || titles.en;
|
||||
}
|
||||
})();
|
||||
if (isIndex) {
|
||||
var titles = {
|
||||
en: 'KoalaSync | Real-time Video Synchronization for Friends',
|
||||
de: 'KoalaSync | Echtzeit-Video-Synchronisation für Freunde'
|
||||
};
|
||||
document.title = titles[activeLang] || titles.en;
|
||||
} else if (isJoin) {
|
||||
var titles = {
|
||||
en: 'Join Room | KoalaSync',
|
||||
de: 'Raum beitreten | KoalaSync'
|
||||
};
|
||||
document.title = titles[activeLang] || titles.en;
|
||||
}
|
||||
})();
|
||||
@@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>KoalaSync | Sincronize Netflix, YouTube e qualquer vídeo com amigos</title>
|
||||
<meta name="description" content="Assista à Netflix, YouTube, Twitch e qualquer vídeo HTML5 em perfeita sincronia com amigos. Extensão de navegador gratuita e de código aberto para Chrome e Firefox. Sem necessidade de registro.">
|
||||
<meta name="description" content="Assista Netflix, YouTube, Twitch e qualquer vídeo HTML5 em perfeita sincronia com amigos. Extensão de navegador gratuita e de código aberto. Sem registro.">
|
||||
|
||||
<link rel="preload" href="../style.css" as="style">
|
||||
<link rel="preload" as="image" href="../assets/LookDownKoala.webp" imagesrcset="../assets/LookDownKoala-1x.webp 90w, ../assets/LookDownKoala.webp 205w" imagesizes="90px" fetchpriority="high">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>KoalaSync | Синхронизация Netflix, YouTube и любого видео с друзьями</title>
|
||||
<meta name="description" content="Смотрите Netflix, YouTube, Twitch и любые HTML5-видео в идеальной синхронизации с друзьями. Бесплатное расширение с открытым исходным кодом для Chrome и Firefox. Регистрация не требуется.">
|
||||
<meta name="description" content="Смотрите Netflix, YouTube, Twitch и любые HTML5-видео в синхронизации с друзьями. Бесплатное расширение браузера с открытым кодом. Регистрация не требуется.">
|
||||
|
||||
<link rel="preload" href="../style.css" as="style">
|
||||
<link rel="preload" as="image" href="../assets/LookDownKoala.webp" imagesrcset="../assets/LookDownKoala-1x.webp 90w, ../assets/LookDownKoala.webp 205w" imagesizes="90px" fetchpriority="high">
|
||||
|
||||
+1
-2572
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user