Compare commits

..
3 Commits
3 changed files with 127 additions and 207 deletions
+83 -127
View File
@@ -1400,7 +1400,10 @@
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// 8. YOUTUBE-IDENTICAL SEARCH BAR & VOICE MODAL ENGINE (v1.2.1) // --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// --------------------------------------------------------------------------
// 8. YOUTUBE-IDENTICAL SEARCH BAR & BULLETPROOF VOICE MODAL (v1.2.4)
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
var activeVoiceRecognition = null; var activeVoiceRecognition = null;
var isVoiceListeningActive = false; var isVoiceListeningActive = false;
@@ -1419,21 +1422,21 @@
modal.style.display = 'none'; modal.style.display = 'none';
modal.innerHTML = modal.innerHTML =
'<div class="yaktube-voice-modal-card">' + '<div class="yaktube-voice-modal-card" style="background:#212121; border-radius:16px; width:90%; max-width:540px; padding:24px; box-shadow:0 16px 40px rgba(0,0,0,0.8); color:#fff; position:relative;">' +
'<div class="yaktube-voice-modal-header">' + '<div class="yaktube-voice-modal-header" style="display:flex; justify-content:space-between; align-items:center; margin-bottom:20px;">' +
'<h2 id="yaktube-voice-modal-title" class="yaktube-voice-modal-title">Sesle arama yapın</h2>' + '<h2 id="yaktube-voice-modal-title" style="font-size:20px; font-weight:600; margin:0; color:#f1f1f1;">Sesle arama yapın</h2>' +
'<button id="yaktube-voice-modal-close" class="yaktube-voice-modal-close-btn" aria-label="Sesli aramayı kapat">✕</button>' + '<button id="yaktube-voice-modal-close" class="yaktube-voice-modal-close-btn" style="background:transparent; border:none; color:#aaa; font-size:22px; cursor:pointer; width:36px; height:36px; border-radius:50%; display:flex; align-items:center; justify-content:center;" aria-label="Sesli aramayı kapat">✕</button>' +
'</div>' + '</div>' +
'<div class="yaktube-voice-modal-body">' + '<div class="yaktube-voice-modal-body" style="text-align:center; padding:10px 0 15px 0;">' +
'<div id="yaktube-voice-status-text" class="yaktube-voice-status-text">Dinleniyor...</div>' + '<div id="yaktube-voice-status-text" style="font-size:22px; font-weight:700; color:#f1f1f1; margin-bottom:12px; min-height:30px;">Dinleniyor...</div>' +
'<div id="yaktube-voice-transcript-preview" class="yaktube-voice-transcript-preview"></div>' + '<div id="yaktube-voice-transcript-preview" style="font-size:16px; color:#ff8f37; font-weight:600; margin-bottom:24px; min-height:24px; word-break:break-word;"></div>' +
'<div class="yaktube-voice-mic-wrapper">' + '<div class="yaktube-voice-mic-wrapper" style="position:relative; display:inline-flex; align-items:center; justify-content:center; margin:10px 0 20px 0;">' +
'<button id="yaktube-voice-mic-pulse-btn" class="yaktube-voice-mic-pulse-btn" aria-label="Mikrofonu durdur veya başlat">' + '<button id="yaktube-voice-mic-pulse-btn" class="yaktube-voice-mic-pulse-btn" style="background:#cc0000; color:#fff; border:none; border-radius:50%; width:76px; height:76px; font-size:34px; cursor:pointer; display:flex; align-items:center; justify-content:center; box-shadow:0 4px 20px rgba(204,0,0,0.5); z-index:2;" aria-label="Mikrofonu durdur veya başlat">' +
'🎙️' + '🎙️' +
'</button>' + '</button>' +
'<div id="yaktube-voice-ripple" class="yaktube-voice-ripple"></div>' + '<div id="yaktube-voice-ripple" class="yaktube-voice-ripple" style="position:absolute; width:76px; height:76px; border-radius:50%; background:rgba(204,0,0,0.4); animation:yaktube-ripple-wave 1.6s infinite ease-out; z-index:1;"></div>' +
'</div>' + '</div>' +
'<div class="yaktube-voice-hint-text">Aramak istediğiniz sanatçıyı, şarkıyı veya konuyu söyleyin.</div>' + '<div class="yaktube-voice-hint-text" style="font-size:13px; color:#888; margin-top:10px;">Aramak istediğiniz sanatçıyı, şarkıyı veya konuyu söyleyin.</div>' +
'</div>' + '</div>' +
'</div>'; '</div>';
@@ -1441,7 +1444,9 @@
var closeBtn = modal.querySelector('#yaktube-voice-modal-close'); var closeBtn = modal.querySelector('#yaktube-voice-modal-close');
if (closeBtn) { if (closeBtn) {
closeBtn.addEventListener('click', function () { closeBtn.addEventListener('click', function (e) {
e.preventDefault();
e.stopPropagation();
closeYouTubeVoiceModal(); closeYouTubeVoiceModal();
}); });
} }
@@ -1454,7 +1459,9 @@
var pulseBtn = modal.querySelector('#yaktube-voice-mic-pulse-btn'); var pulseBtn = modal.querySelector('#yaktube-voice-mic-pulse-btn');
if (pulseBtn) { if (pulseBtn) {
pulseBtn.addEventListener('click', function () { pulseBtn.addEventListener('click', function (e) {
e.preventDefault();
e.stopPropagation();
if (isVoiceListeningActive) { if (isVoiceListeningActive) {
stopVoiceRecognition(); stopVoiceRecognition();
} else { } else {
@@ -1467,19 +1474,30 @@
} }
function openYouTubeVoiceModal(targetInput) { function openYouTubeVoiceModal(targetInput) {
var SpeechRec = window.SpeechRecognition || window.webkitSpeechRecognition; modalTargetInput =
if (!SpeechRec) { targetInput ||
announce( document.querySelector('my-search-typeahead input, my-header input[type="search"], input[type="search"]');
'Tarayıcınız sesli arama özelliğini desteklemiyor. Lütfen Chrome, Edge veya güncel bir mobil tarayıcı kullanın.'
);
return;
}
var modal = createYouTubeVoiceModal(); var modal = createYouTubeVoiceModal();
modal.style.display = 'flex'; modal.style.display = 'flex';
var statusText = modal.querySelector('#yaktube-voice-status-text');
var transcriptPreview = modal.querySelector('#yaktube-voice-transcript-preview');
if (statusText) statusText.textContent = 'Dinleniyor...';
if (transcriptPreview) transcriptPreview.textContent = '';
announce('Sesli arama penceresi açıldı. Dinleniyor, lütfen aramak istediğiniz videoyu söyleyin.', true); announce('Sesli arama penceresi açıldı. Dinleniyor, lütfen aramak istediğiniz videoyu söyleyin.', true);
modalTargetInput = targetInput; var SpeechRec = window.SpeechRecognition || window.webkitSpeechRecognition;
if (!SpeechRec) {
if (statusText) statusText.textContent = 'Tarayıcıda Ses Tanıma Desteklenmiyor';
var hint = modal.querySelector('.yaktube-voice-hint-text');
if (hint) hint.textContent = 'Lütfen sesli arama için Google Chrome veya Microsoft Edge kullanın.';
stopVoiceRecognition();
announce('Tarayıcınız sesli arama özelliğini desteklemiyor. Lütfen Chrome veya Edge kullanın.');
return;
}
startVoiceRecognition(); startVoiceRecognition();
var closeBtn = modal.querySelector('#yaktube-voice-modal-close'); var closeBtn = modal.querySelector('#yaktube-voice-modal-close');
@@ -1490,7 +1508,7 @@
var modal = document.getElementById('yaktube-voice-modal'); var modal = document.getElementById('yaktube-voice-modal');
if (modal) modal.style.display = 'none'; if (modal) modal.style.display = 'none';
stopVoiceRecognition(); stopVoiceRecognition();
announce('Sesli arama kapatıldı.'); announce('Sesli arama penceresi kapatıldı.');
} }
function startVoiceRecognition() { function startVoiceRecognition() {
@@ -1511,7 +1529,10 @@
if (statusText) statusText.textContent = 'Dinleniyor...'; if (statusText) statusText.textContent = 'Dinleniyor...';
if (transcriptPreview) transcriptPreview.textContent = ''; if (transcriptPreview) transcriptPreview.textContent = '';
if (micBtn) micBtn.classList.remove('yaktube-idle-mic'); if (micBtn) {
micBtn.style.background = '#cc0000';
micBtn.style.boxShadow = '0 4px 20px rgba(204,0,0,0.5)';
}
if (ripple) ripple.style.display = 'block'; if (ripple) ripple.style.display = 'block';
try { try {
@@ -1559,7 +1580,7 @@
statusText.textContent = 'Ses Algılanamadı'; statusText.textContent = 'Ses Algılanamadı';
announce('Ses algılanamadı, tekrar denemek için mikrofona dokunun.'); announce('Ses algılanamadı, tekrar denemek için mikrofona dokunun.');
} else { } else {
statusText.textContent = 'Bir sorun oluştu'; statusText.textContent = 'Tekrar Deneyin';
} }
} }
stopVoiceRecognition(); stopVoiceRecognition();
@@ -1593,7 +1614,10 @@
var ripple = modal.querySelector('#yaktube-voice-ripple'); var ripple = modal.querySelector('#yaktube-voice-ripple');
var statusText = modal.querySelector('#yaktube-voice-status-text'); var statusText = modal.querySelector('#yaktube-voice-status-text');
if (micBtn) micBtn.classList.add('yaktube-idle-mic'); if (micBtn) {
micBtn.style.background = '#333';
micBtn.style.boxShadow = 'none';
}
if (ripple) ripple.style.display = 'none'; if (ripple) ripple.style.display = 'none';
if (statusText && statusText.textContent === 'Dinleniyor...') { if (statusText && statusText.textContent === 'Dinleniyor...') {
statusText.textContent = 'Mikrofona dokunup konuşun'; statusText.textContent = 'Mikrofona dokunup konuşun';
@@ -1604,41 +1628,31 @@
function transformToYouTubeSearchBar(searchInp, searchContainer) { function transformToYouTubeSearchBar(searchInp, searchContainer) {
if (searchInp.hasAttribute('data-yaktube-yt-styled')) return; if (searchInp.hasAttribute('data-yaktube-yt-styled')) return;
searchInp.setAttribute('data-yaktube-yt-styled', 'true'); searchInp.setAttribute('data-yaktube-yt-styled', 'true');
searchInp.setAttribute('aria-label', getInstanceName() + ' Video Arama');
// 1. Back button for Mobile Navigation (←) // 1. Create Outer Wrapper
var backBtn = searchContainer.querySelector('.yaktube-search-back-btn'); var outerWrap = searchContainer.querySelector('.yaktube-search-outer-wrap');
if (!backBtn) { if (!outerWrap) {
backBtn = document.createElement('button'); outerWrap = document.createElement('div');
backBtn.type = 'button'; outerWrap.className = 'yaktube-search-outer-wrap';
backBtn.className = 'yaktube-search-back-btn'; searchInp.parentNode.insertBefore(outerWrap, searchInp);
backBtn.setAttribute('aria-label', 'Aramadan Çık (Geri)');
backBtn.setAttribute('title', 'Aramadan Çık (Geri)');
backBtn.innerHTML = '←';
searchContainer.prepend(backBtn);
backBtn.addEventListener('click', function (e) {
e.preventDefault();
e.stopPropagation();
document.body.classList.remove('yaktube-mobile-search-active');
searchInp.blur();
announce('Arama kapatıldı.');
});
} }
// 2. Wrap input inside YouTube Pill Container // 2. Create Pill Box
var pillWrapper = searchInp.closest('.yaktube-search-pill-wrapper'); var pillWrapper = outerWrap.querySelector('.yaktube-search-pill-wrapper');
if (!pillWrapper) { if (!pillWrapper) {
pillWrapper = document.createElement('div'); pillWrapper = document.createElement('div');
pillWrapper.className = 'yaktube-search-pill-wrapper'; pillWrapper.className = 'yaktube-search-pill-wrapper';
outerWrap.appendChild(pillWrapper);
searchInp.parentNode.insertBefore(pillWrapper, searchInp); // Move Input Inside Pill
pillWrapper.appendChild(searchInp); pillWrapper.appendChild(searchInp);
// Add Clear Button (✕) // Add Clear Button (✕)
var clearBtn = document.createElement('button'); var clearBtn = document.createElement('button');
clearBtn.type = 'button'; clearBtn.type = 'button';
clearBtn.className = 'yaktube-clear-search-btn'; clearBtn.className = 'yaktube-clear-search-btn';
clearBtn.setAttribute('aria-label', 'Arama Metnini Temizle (Escape)'); clearBtn.setAttribute('aria-label', 'Arama Metnini Temizle');
clearBtn.innerHTML = '✕'; clearBtn.innerHTML = '✕';
pillWrapper.appendChild(clearBtn); pillWrapper.appendChild(clearBtn);
@@ -1647,6 +1661,7 @@
submitBtn.type = 'submit'; submitBtn.type = 'submit';
submitBtn.className = 'yaktube-search-submit-btn'; submitBtn.className = 'yaktube-search-submit-btn';
submitBtn.setAttribute('aria-label', 'Ara'); submitBtn.setAttribute('aria-label', 'Ara');
submitBtn.setAttribute('title', 'Ara');
submitBtn.innerHTML = '🔍'; submitBtn.innerHTML = '🔍';
pillWrapper.appendChild(submitBtn); pillWrapper.appendChild(submitBtn);
@@ -1659,12 +1674,7 @@
} }
searchInp.addEventListener('input', updateClearState); searchInp.addEventListener('input', updateClearState);
searchInp.addEventListener('focus', function () { searchInp.addEventListener('focus', updateClearState);
updateClearState();
if (window.innerWidth <= 768) {
document.body.classList.add('yaktube-mobile-search-active');
}
});
clearBtn.addEventListener('click', function (e) { clearBtn.addEventListener('click', function (e) {
e.preventDefault(); e.preventDefault();
@@ -1691,7 +1701,7 @@
} }
// 3. YouTube Circular Voice Button (🎙️) Beside the Pill Box // 3. YouTube Circular Voice Button (🎙️) Beside the Pill Box
var voiceBtn = searchContainer.querySelector('.yaktube-voice-search-btn'); var voiceBtn = outerWrap.querySelector('.yaktube-voice-search-btn');
if (!voiceBtn) { if (!voiceBtn) {
voiceBtn = document.createElement('button'); voiceBtn = document.createElement('button');
voiceBtn.type = 'button'; voiceBtn.type = 'button';
@@ -1700,7 +1710,7 @@
voiceBtn.setAttribute('title', 'Sesle Ara (Shift+V)'); voiceBtn.setAttribute('title', 'Sesle Ara (Shift+V)');
voiceBtn.innerHTML = '🎙️'; voiceBtn.innerHTML = '🎙️';
searchContainer.appendChild(voiceBtn); outerWrap.appendChild(voiceBtn);
voiceBtn.addEventListener('click', function (e) { voiceBtn.addEventListener('click', function (e) {
e.preventDefault(); e.preventDefault();
@@ -1717,7 +1727,6 @@
searchInp.dispatchEvent(new Event('input', { bubbles: true })); searchInp.dispatchEvent(new Event('input', { bubbles: true }));
announce('Arama metni temizlendi.'); announce('Arama metni temizlendi.');
} else { } else {
document.body.classList.remove('yaktube-mobile-search-active');
searchInp.blur(); searchInp.blur();
announce('Arama kutusundan çıkıldı.'); announce('Arama kutusundan çıkıldı.');
} }
@@ -1725,67 +1734,7 @@
}); });
} }
function injectMobileSearchTrigger() {
var headerRight =
document.querySelector('my-header .header-right') ||
document.querySelector('my-header .buttons-container') ||
document.querySelector('my-header .user-menu');
if (!headerRight) return;
var triggerBtn = headerRight.querySelector('#yaktube-mobile-search-open-btn');
if (!triggerBtn) {
triggerBtn = document.createElement('button');
triggerBtn.id = 'yaktube-mobile-search-open-btn';
triggerBtn.type = 'button';
triggerBtn.className = 'yaktube-mobile-search-trigger';
triggerBtn.setAttribute('aria-label', 'Aramayı Aç');
triggerBtn.setAttribute('title', 'Aramayı Aç');
triggerBtn.innerHTML = '🔍';
triggerBtn.style.cssText =
'background: transparent; color: #fff; border: none; font-size: 18px; width: 38px; height: 38px; border-radius: 50%; display: none; align-items: center; justify-content: center; cursor: pointer; margin-right: 4px;';
headerRight.prepend(triggerBtn);
triggerBtn.addEventListener('click', function (e) {
e.preventDefault();
e.stopPropagation();
document.body.classList.add('yaktube-mobile-search-active');
var searchInp = document.querySelector(
'my-search-typeahead input, my-header input[type="search"], input[type="search"]'
);
if (searchInp) {
searchInp.focus();
}
announce('Arama ekranı açıldı.');
});
}
var mobileVoiceTrigger = headerRight.querySelector('#yaktube-mobile-voice-open-btn');
if (!mobileVoiceTrigger) {
mobileVoiceTrigger = document.createElement('button');
mobileVoiceTrigger.id = 'yaktube-mobile-voice-open-btn';
mobileVoiceTrigger.type = 'button';
mobileVoiceTrigger.className = 'yaktube-mobile-search-trigger';
mobileVoiceTrigger.setAttribute('aria-label', 'Sesli Arama');
mobileVoiceTrigger.setAttribute('title', 'Sesli Arama');
mobileVoiceTrigger.innerHTML = '🎙️';
mobileVoiceTrigger.style.cssText =
'background: transparent; color: #fff; border: none; font-size: 18px; width: 38px; height: 38px; border-radius: 50%; display: none; align-items: center; justify-content: center; cursor: pointer; margin-right: 4px;';
headerRight.insertBefore(mobileVoiceTrigger, triggerBtn.nextSibling);
mobileVoiceTrigger.addEventListener('click', function (e) {
e.preventDefault();
e.stopPropagation();
var searchInp = document.querySelector(
'my-search-typeahead input, my-header input[type="search"], input[type="search"]'
);
openYouTubeVoiceModal(searchInp);
});
}
}
function injectSearchEnhancements() { function injectSearchEnhancements() {
injectMobileSearchTrigger();
var searchContainers = document.querySelectorAll( var searchContainers = document.querySelectorAll(
'my-search-typeahead, .search-container, .header-search, my-header .search' 'my-search-typeahead, .search-container, .header-search, my-header .search'
); );
@@ -1808,6 +1757,22 @@
transformToYouTubeSearchBar(inp, parent); transformToYouTubeSearchBar(inp, parent);
} }
}); });
// Clean up repetitive card titles and strange relative date buttons
document.querySelectorAll('my-video-miniature, .video-miniature').forEach(function (card) {
var thumbLink = card.querySelector('a.thumbnail-link, .video-thumbnail a, a.thumbnail');
if (thumbLink && !thumbLink.hasAttribute('aria-hidden')) {
thumbLink.setAttribute('aria-hidden', 'true');
thumbLink.setAttribute('tabindex', '-1');
}
var dateBtn = card.querySelector('.video-date-line button, .video-date button, button[title*="tarih"]');
if (dateBtn && !dateBtn.hasAttribute('data-cleaned')) {
dateBtn.setAttribute('data-cleaned', 'true');
var dateText = dateBtn.textContent.trim();
dateBtn.setAttribute('aria-label', dateText);
}
});
} }
// Global Keyboard Shortcuts // Global Keyboard Shortcuts
@@ -1823,26 +1788,17 @@
); );
openYouTubeVoiceModal(searchInp); openYouTubeVoiceModal(searchInp);
} }
// Escape: Close Voice Modal or exit mobile search // Escape: Close Voice Modal
else if (e.key === 'Escape' || e.keyCode === 27) { else if (e.key === 'Escape' || e.keyCode === 27) {
var modal = document.getElementById('yaktube-voice-modal'); var modal = document.getElementById('yaktube-voice-modal');
if (modal && modal.style.display === 'flex') { if (modal && modal.style.display === 'flex') {
e.preventDefault(); e.preventDefault();
closeYouTubeVoiceModal(); closeYouTubeVoiceModal();
} else if (document.body.classList.contains('yaktube-mobile-search-active')) {
e.preventDefault();
document.body.classList.remove('yaktube-mobile-search-active');
var searchInp = document.querySelector(
'my-search-typeahead input, my-header input[type="search"], input[type="search"]'
);
if (searchInp) searchInp.blur();
announce('Arama kapatıldı.');
} }
} }
// / : Focus Search Input // / : Focus Search Input
else if (e.key === '/' && !isInputActive && !e.ctrlKey && !e.metaKey) { else if (e.key === '/' && !isInputActive && !e.ctrlKey && !e.metaKey) {
e.preventDefault(); e.preventDefault();
document.body.classList.add('yaktube-mobile-search-active');
var searchInp = document.querySelector( var searchInp = document.querySelector(
'my-search-typeahead input, my-header input[type="search"], input[type="search"]' 'my-search-typeahead input, my-header input[type="search"], input[type="search"]'
); );
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "peertube-plugin-yaktube-ondemand", "name": "peertube-plugin-yaktube-ondemand",
"version": "1.2.1", "version": "1.2.4",
"description": "Accessible On-Demand YouTube Import, Live Streams, Smart Recommendations and A11y Engine for PeerTube", "description": "Accessible On-Demand YouTube Import, Live Streams, Smart Recommendations and A11y Engine for PeerTube",
"main": "main.js", "main": "main.js",
"clientScripts": [ "clientScripts": [
+43 -79
View File
@@ -408,29 +408,29 @@ my-header .action-buttons {
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* YOUTUBE-STYLE SEARCH BAR & VOICE SEARCH MODAL (v1.2.1) */ /* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* YOUTUBE-STYLE SEARCH BAR & VOICE SEARCH (v1.2.3 - Universal & Visible) */
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* Desktop & Common Pill Styling */ my-search-typeahead,
@media (min-width: 769px) { .search-container,
my-search-typeahead, .header-search {
.search-container, display: flex !important;
.header-search { align-items: center !important;
display: flex !important; position: relative !important;
align-items: center !important; width: 100% !important;
position: relative !important; max-width: 580px !important;
width: 100% !important; margin: 0 auto !important;
max-width: 580px !important; visibility: visible !important;
margin: 0 auto !important; opacity: 1 !important;
} }
.yaktube-search-back-btn { .yaktube-search-outer-wrap {
display: none !important; display: flex !important;
} align-items: center !important;
width: 100% !important;
.yaktube-mobile-search-trigger { position: relative !important;
display: none !important;
}
} }
.yaktube-search-pill-wrapper { .yaktube-search-pill-wrapper {
@@ -439,10 +439,11 @@ my-header .action-buttons {
background: #121212 !important; background: #121212 !important;
border: 1px solid #303030 !important; border: 1px solid #303030 !important;
border-radius: 40px !important; border-radius: 40px !important;
padding: 2px 6px 2px 14px !important; padding: 0 0 0 14px !important;
transition: all 0.2s ease !important; transition: all 0.2s ease !important;
width: 100% !important; width: 100% !important;
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4) !important; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4) !important;
overflow: hidden !important;
} }
.yaktube-search-pill-wrapper:focus-within { .yaktube-search-pill-wrapper:focus-within {
@@ -469,18 +470,18 @@ my-header .action-buttons {
font-size: 14px !important; font-size: 14px !important;
} }
/* Clear Button Inside Pill */ /* Clear Button Inside Pill (✕) */
.yaktube-clear-search-btn { .yaktube-clear-search-btn {
background: rgba(255, 255, 255, 0.12) !important; background: rgba(255, 255, 255, 0.12) !important;
color: #aaa !important; color: #aaa !important;
border: none !important; border: none !important;
border-radius: 50% !important; border-radius: 50% !important;
width: 24px !important; width: 22px !important;
height: 24px !important; height: 22px !important;
display: none; display: none;
align-items: center !important; align-items: center !important;
justify-content: center !important; justify-content: center !important;
font-size: 12px !important; font-size: 11px !important;
font-weight: 700 !important; font-weight: 700 !important;
cursor: pointer !important; cursor: pointer !important;
margin: 0 6px !important; margin: 0 6px !important;
@@ -493,13 +494,12 @@ my-header .action-buttons {
color: #fff !important; color: #fff !important;
} }
/* Search Submit Button on Right of Pill */ /* Search Submit Button on Right of Pill (🔍) */
.yaktube-search-submit-btn { .yaktube-search-submit-btn {
background: #222222 !important; background: #222222 !important;
color: #f1f1f1 !important; color: #f1f1f1 !important;
border: none !important; border: none !important;
border-left: 1px solid #303030 !important; border-left: 1px solid #303030 !important;
border-radius: 0 40px 40px 0 !important;
padding: 8px 18px !important; padding: 8px 18px !important;
cursor: pointer !important; cursor: pointer !important;
display: inline-flex !important; display: inline-flex !important;
@@ -507,7 +507,7 @@ my-header .action-buttons {
justify-content: center !important; justify-content: center !important;
font-size: 14px !important; font-size: 14px !important;
transition: all 0.2s ease !important; transition: all 0.2s ease !important;
margin: -2px -6px -2px 0 !important; flex-shrink: 0 !important;
} }
.yaktube-search-submit-btn:hover { .yaktube-search-submit-btn:hover {
@@ -515,7 +515,7 @@ my-header .action-buttons {
color: #ff8f37 !important; color: #ff8f37 !important;
} }
/* YouTube Circular Voice Button Beside Search Box */ /* YouTube Circular Voice Button (🎙️) */
.yaktube-voice-search-btn { .yaktube-voice-search-btn {
background: #1f1f1f !important; background: #1f1f1f !important;
color: #f1f1f1 !important; color: #f1f1f1 !important;
@@ -528,7 +528,7 @@ my-header .action-buttons {
justify-content: center !important; justify-content: center !important;
font-size: 18px !important; font-size: 18px !important;
cursor: pointer !important; cursor: pointer !important;
margin-left: 10px !important; margin-left: 8px !important;
transition: all 0.25s ease !important; transition: all 0.25s ease !important;
flex-shrink: 0 !important; flex-shrink: 0 !important;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
@@ -688,57 +688,21 @@ my-header .action-buttons {
margin-top: 10px !important; margin-top: 10px !important;
} }
/* -------------------------------------------------------------------------- */ /* Mobile Responsiveness */
/* MOBILE SEARCH OVERLAY MODE (< 768px) */
/* -------------------------------------------------------------------------- */
@media (max-width: 768px) { @media (max-width: 768px) {
/* Default Mobile State: Hide Full Search Input */ my-search-typeahead,
body:not(.yaktube-mobile-search-active) my-search-typeahead, .search-container,
body:not(.yaktube-mobile-search-active) .search-container, .header-search {
body:not(.yaktube-mobile-search-active) .header-search {
display: none !important;
}
.yaktube-mobile-search-trigger {
display: inline-flex !important;
}
/* Active Mobile Search Overlay: Full Width Bar */
body.yaktube-mobile-search-active my-header {
padding: 0 8px !important;
position: relative !important;
}
body.yaktube-mobile-search-active my-header .header-left,
body.yaktube-mobile-search-active my-header .header-right,
body.yaktube-mobile-search-active my-header .user-menu,
body.yaktube-mobile-search-active my-header .brand-name {
display: none !important;
}
body.yaktube-mobile-search-active my-search-typeahead,
body.yaktube-mobile-search-active .search-container {
width: 100% !important;
max-width: 100% !important; max-width: 100% !important;
display: flex !important; padding: 0 4px !important;
position: static !important;
margin: 0 !important;
z-index: 1000 !important;
} }
.yaktube-search-submit-btn {
.yaktube-search-back-btn { padding: 8px 12px !important;
display: inline-flex !important; }
background: transparent !important; .yaktube-voice-search-btn {
border: none !important; width: 36px !important;
color: #fff !important; height: 36px !important;
font-size: 22px !important; font-size: 16px !important;
width: 38px !important; margin-left: 4px !important;
height: 38px !important;
border-radius: 50% !important;
align-items: center !important;
justify-content: center !important;
cursor: pointer !important;
margin-right: 6px !important;
flex-shrink: 0 !important;
} }
} }