Git Komut Rehberi & Terminal Asistanı
Sıfırdan Yeni Bir Depo Başlatın:
Mevcut Bir Git Deposu veya Klasörü Gönderin:
Hataları Geri Alma, İptal & Temizlik:
Son commit'i geri al (yapılan değişiklikleri korur):
git reset --soft HEAD~1
Yapılan yerel değişiklikleri iptal et (çalışma ağacını temizler):
git restore .
Takip edilmeyen gereksiz dosyaları sil:
git clean -fd
Değişiklikleri geçici sakla ve geri getir (stash):
git stash git stash pop
Dal (Branch) ve Sürüm Etiketleri:
Yeni dal aç ve geçiş yap:
git checkout -b yeni-ozellik git push -u origin yeni-ozellik
Sürüm etiketi (tag) oluştur ve gönder:
git tag -a v1.0.0 -m "Sürüm 1.0.0" git push origin --tags
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1fb61b784e | ||
|
|
65fdc8a71f | ||
|
|
944b779fcd | ||
|
|
798c850cef | ||
|
|
4e4c7d37eb |
@@ -1,3 +1,4 @@
|
|||||||
|
var cachedYakNetSsoEnabled = null;
|
||||||
// 100% Incompatible Browser Suppression & Error Guardian
|
// 100% Incompatible Browser Suppression & Error Guardian
|
||||||
// CRITICAL: PeerTube's Angular app (my-app ngOnInit) relies on document.getElementById('incompatible-browser')
|
// CRITICAL: PeerTube's Angular app (my-app ngOnInit) relies on document.getElementById('incompatible-browser')
|
||||||
// to exist so it can do .className += " browser-ok" before calling this.loadUser()!
|
// to exist so it can do .className += " browser-ok" before calling this.loadUser()!
|
||||||
@@ -582,6 +583,10 @@ try {
|
|||||||
btn.setAttribute('tabindex', '-1');
|
btn.setAttribute('tabindex', '-1');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (!isYakNetSsoEnabled()) {
|
||||||
|
if (liveWidget) liveWidget.remove();
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!liveWidget && isOfficialYakTubeServer()) {
|
if (!liveWidget && isOfficialYakTubeServer()) {
|
||||||
var widgetWrap = document.createElement('div');
|
var widgetWrap = document.createElement('div');
|
||||||
widgetWrap.id = 'yaknet-header-account-widget';
|
widgetWrap.id = 'yaknet-header-account-widget';
|
||||||
@@ -684,7 +689,7 @@ try {
|
|||||||
btn.removeAttribute('tabindex');
|
btn.removeAttribute('tabindex');
|
||||||
|
|
||||||
var loginAnchor = btn.tagName.toLowerCase() === 'a' ? btn : btn.querySelector('a');
|
var loginAnchor = btn.tagName.toLowerCase() === 'a' ? btn : btn.querySelector('a');
|
||||||
if (loginAnchor) {
|
if (loginAnchor && isYakNetSsoEnabled()) {
|
||||||
loginAnchor.setAttribute('aria-label', 'YakNet ile Giriş Yap');
|
loginAnchor.setAttribute('aria-label', 'YakNet ile Giriş Yap');
|
||||||
loginAnchor.setAttribute('title', 'YakNet ile Giriş Yap');
|
loginAnchor.setAttribute('title', 'YakNet ile Giriş Yap');
|
||||||
var spanText = loginAnchor.querySelector('span');
|
var spanText = loginAnchor.querySelector('span');
|
||||||
@@ -707,7 +712,7 @@ try {
|
|||||||
document.querySelector('form[action*="login"]') ||
|
document.querySelector('form[action*="login"]') ||
|
||||||
document.querySelector('my-login-modal');
|
document.querySelector('my-login-modal');
|
||||||
|
|
||||||
if (loginCard && !document.getElementById('yaknet-login-section')) {
|
if (loginCard && isYakNetSsoEnabled() && !document.getElementById('yaknet-login-section')) {
|
||||||
var isLocalLogin = window.location.search.includes('local=true') || window.location.pathname.includes('/admin');
|
var isLocalLogin = window.location.search.includes('local=true') || window.location.pathname.includes('/admin');
|
||||||
|
|
||||||
var ssoBox = document.createElement('div');
|
var ssoBox = document.createElement('div');
|
||||||
@@ -1016,15 +1021,18 @@ try {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (img.src && (img.src.includes('logo') || img.className.includes('logo'))) {
|
|
||||||
img.setAttribute('alt', getInstanceName() + ' Logo');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var parentLink = img.closest('a');
|
var parentLink = img.closest('a');
|
||||||
if (parentLink && parentLink.textContent && parentLink.textContent.trim().length > 0) {
|
if (parentLink && parentLink.textContent && parentLink.textContent.trim().length > 0) {
|
||||||
img.setAttribute('alt', '');
|
img.setAttribute('alt', '');
|
||||||
} else if (parentLink && parentLink.getAttribute('title')) {
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (img.src && (img.src.includes('logo') || img.className.includes('logo'))) {
|
||||||
|
img.setAttribute('alt', getInstanceName());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (parentLink && parentLink.getAttribute('title')) {
|
||||||
img.setAttribute('alt', parentLink.getAttribute('title'));
|
img.setAttribute('alt', parentLink.getAttribute('title'));
|
||||||
} else {
|
} else {
|
||||||
img.setAttribute('alt', 'Görsel');
|
img.setAttribute('alt', 'Görsel');
|
||||||
@@ -1074,6 +1082,466 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 3. Screen-Reader & Turkish Q Optimized Shortcuts & Player Bar (v1.4.1)
|
// 3. Screen-Reader & Turkish Q Optimized Shortcuts & Player Bar (v1.4.1)
|
||||||
|
// YakTube NLnet WCAG 2.2 AAA & Privacy Suite Modules
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// 1. WCAG 2.2 AAA Focus Trap & Modal Management
|
||||||
|
// ============================================================================
|
||||||
|
var lastActiveElementBeforeModal = null;
|
||||||
|
|
||||||
|
function trapFocusInModal(modalEl) {
|
||||||
|
if (!modalEl) return;
|
||||||
|
var focusableElements = modalEl.querySelectorAll(
|
||||||
|
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
||||||
|
);
|
||||||
|
if (!focusableElements.length) return;
|
||||||
|
var firstFocusable = focusableElements[0];
|
||||||
|
var lastFocusable = focusableElements[focusableElements.length - 1];
|
||||||
|
|
||||||
|
function handleKeydown(e) {
|
||||||
|
if (e.key !== 'Tab') return;
|
||||||
|
if (e.shiftKey) {
|
||||||
|
if (document.activeElement === firstFocusable) {
|
||||||
|
e.preventDefault();
|
||||||
|
lastFocusable.focus();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (document.activeElement === lastFocusable) {
|
||||||
|
e.preventDefault();
|
||||||
|
firstFocusable.focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
modalEl.removeEventListener('keydown', modalEl._trapHandler);
|
||||||
|
modalEl._trapHandler = handleKeydown;
|
||||||
|
modalEl.addEventListener('keydown', handleKeydown);
|
||||||
|
setTimeout(function () {
|
||||||
|
firstFocusable.focus();
|
||||||
|
}, 50);
|
||||||
|
}
|
||||||
|
|
||||||
|
function recordFocusBeforeModal() {
|
||||||
|
lastActiveElementBeforeModal = document.activeElement;
|
||||||
|
}
|
||||||
|
|
||||||
|
function restoreFocusAfterModal() {
|
||||||
|
if (lastActiveElementBeforeModal && typeof lastActiveElementBeforeModal.focus === 'function') {
|
||||||
|
try {
|
||||||
|
lastActiveElementBeforeModal.focus();
|
||||||
|
} catch (e) {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// 2. Audio-Only & Screen Blank Mode (NLnet Privacy & Bandwidth Shield)
|
||||||
|
// ============================================================================
|
||||||
|
var isAudioOnlyMode = false;
|
||||||
|
var wakeLockSentinel = null;
|
||||||
|
|
||||||
|
async function requestScreenWakeLock() {
|
||||||
|
try {
|
||||||
|
if ('wakeLock' in navigator) {
|
||||||
|
wakeLockSentinel = await navigator.wakeLock.request('screen');
|
||||||
|
wakeLockSentinel.addEventListener('release', function () {
|
||||||
|
wakeLockSentinel = null;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.warn('[YakTube] WakeLock error:', err);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function releaseScreenWakeLock() {
|
||||||
|
if (wakeLockSentinel) {
|
||||||
|
wakeLockSentinel.release().catch(function () {});
|
||||||
|
wakeLockSentinel = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function toggleAudioOnlyMode() {
|
||||||
|
var video = getVideoElement();
|
||||||
|
if (!video) {
|
||||||
|
announce('Aktif video bulunamadı.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
isAudioOnlyMode = !isAudioOnlyMode;
|
||||||
|
document.body.classList.toggle('yaktube-audio-only-active', isAudioOnlyMode);
|
||||||
|
|
||||||
|
var overlay = document.getElementById('yaktube-audio-blank-overlay');
|
||||||
|
var audioBtn = document.getElementById('yaktube-bar-audio-btn');
|
||||||
|
|
||||||
|
if (isAudioOnlyMode) {
|
||||||
|
if (!overlay) {
|
||||||
|
overlay = document.createElement('div');
|
||||||
|
overlay.id = 'yaktube-audio-blank-overlay';
|
||||||
|
overlay.className = 'yaktube-audio-blank-overlay';
|
||||||
|
overlay.setAttribute('role', 'region');
|
||||||
|
overlay.setAttribute('aria-label', 'Yalnızca Ses ve Ekran Karartma Modu');
|
||||||
|
overlay.innerHTML =
|
||||||
|
'<div class="yaktube-audio-blank-content">' +
|
||||||
|
'<div style="font-size:48px; margin-bottom:12px;">📻</div>' +
|
||||||
|
'<h3 style="margin:0 0 8px 0; font-size:20px; font-weight:700; color:#ff8f37;">Yalnızca Ses Modu Aktif</h3>' +
|
||||||
|
'<p style="margin:0 0 16px 0; font-size:14px; color:#aaa; max-width:380px;">Ekran pil ve veri tasarrufu için karartıldı. Arka planda çalma desteklenir.</p>' +
|
||||||
|
'<div style="display:flex; gap:12px; justify-content:center; flex-wrap:wrap;">' +
|
||||||
|
'<button id="yaktube-exit-audio-btn" class="yaktube-audio-action-btn" aria-label="Görüntüyü Aç ve Ses Modundan Çık">🎬 Görüntüyü Aç (Alt+O)</button>' +
|
||||||
|
'<button id="yaktube-toggle-play-audio-btn" class="yaktube-audio-action-btn" aria-label="Oynat veya Duraklat">⏯️ Oynat / Duraklat (Boşluk)</button>' +
|
||||||
|
'</div>' +
|
||||||
|
'</div>';
|
||||||
|
|
||||||
|
var exitBtn = overlay.querySelector('#yaktube-exit-audio-btn');
|
||||||
|
if (exitBtn) {
|
||||||
|
exitBtn.addEventListener('click', toggleAudioOnlyMode);
|
||||||
|
}
|
||||||
|
var togglePlayBtn = overlay.querySelector('#yaktube-toggle-play-audio-btn');
|
||||||
|
if (togglePlayBtn) {
|
||||||
|
togglePlayBtn.addEventListener('click', function () {
|
||||||
|
var v = getVideoElement();
|
||||||
|
if (v) {
|
||||||
|
if (v.paused) v.play();
|
||||||
|
else v.pause();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
document.body.appendChild(overlay);
|
||||||
|
}
|
||||||
|
overlay.style.display = 'flex';
|
||||||
|
requestScreenWakeLock();
|
||||||
|
if (audioBtn) {
|
||||||
|
audioBtn.classList.add('active');
|
||||||
|
audioBtn.setAttribute('aria-pressed', 'true');
|
||||||
|
}
|
||||||
|
announce(
|
||||||
|
'Yalnızca ses modu açıldı. Ekran karartıldı, pil ve veri tasarrufu aktif. Çıkmak için Alt+O tuşuna basın.'
|
||||||
|
);
|
||||||
|
showQuickToast('📻 Yalnızca Ses Modu Açık');
|
||||||
|
} else {
|
||||||
|
if (overlay) overlay.style.display = 'none';
|
||||||
|
releaseScreenWakeLock();
|
||||||
|
if (audioBtn) {
|
||||||
|
audioBtn.classList.remove('active');
|
||||||
|
audioBtn.setAttribute('aria-pressed', 'false');
|
||||||
|
}
|
||||||
|
announce('Yalnızca ses modu kapatıldı. Görüntü normale döndü.');
|
||||||
|
showQuickToast('🎬 Normal Görüntü Modu');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// 3. Accessible Live Transcript Reader (NLnet WCAG 2.2 AAA Milestone)
|
||||||
|
// ============================================================================
|
||||||
|
var liveTranscriptCues = [];
|
||||||
|
var isTranscriptPanelOpen = false;
|
||||||
|
|
||||||
|
function extractVideoCaptions() {
|
||||||
|
var video = getVideoElement();
|
||||||
|
if (!video || !video.textTracks || !video.textTracks.length) return [];
|
||||||
|
|
||||||
|
var cuesList = [];
|
||||||
|
for (var i = 0; i < video.textTracks.length; i++) {
|
||||||
|
var track = video.textTracks[i];
|
||||||
|
if (track.cues && track.cues.length) {
|
||||||
|
for (var j = 0; j < track.cues.length; j++) {
|
||||||
|
var cue = track.cues[j];
|
||||||
|
cuesList.push({
|
||||||
|
startTime: cue.startTime,
|
||||||
|
endTime: cue.endTime,
|
||||||
|
text: (cue.text || '').replace(/<[^>]*>/g, '').trim()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return cuesList;
|
||||||
|
}
|
||||||
|
|
||||||
|
function openTranscriptPanel() {
|
||||||
|
var existing = document.getElementById('yaktube-transcript-panel');
|
||||||
|
if (existing) {
|
||||||
|
existing.remove();
|
||||||
|
isTranscriptPanelOpen = false;
|
||||||
|
restoreFocusAfterModal();
|
||||||
|
announce('Transkript paneli kapatıldı.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
recordFocusBeforeModal();
|
||||||
|
isTranscriptPanelOpen = true;
|
||||||
|
|
||||||
|
var cues = extractVideoCaptions();
|
||||||
|
var video = getVideoElement();
|
||||||
|
var curTime = video ? video.currentTime : 0;
|
||||||
|
|
||||||
|
var panel = document.createElement('div');
|
||||||
|
panel.id = 'yaktube-transcript-panel';
|
||||||
|
panel.className = 'yaktube-transcript-panel';
|
||||||
|
panel.setAttribute('role', 'region');
|
||||||
|
panel.setAttribute('aria-label', 'Video Transkript ve Canlı Metin İnceleyici');
|
||||||
|
|
||||||
|
var listHtml = '';
|
||||||
|
if (cues && cues.length) {
|
||||||
|
liveTranscriptCues = cues;
|
||||||
|
cues.forEach(function (c, idx) {
|
||||||
|
var isActive = curTime >= c.startTime && curTime <= c.endTime;
|
||||||
|
listHtml +=
|
||||||
|
'<li class="yaktube-transcript-item ' +
|
||||||
|
(isActive ? 'active' : '') +
|
||||||
|
'" data-start="' +
|
||||||
|
c.startTime +
|
||||||
|
'" tabindex="0" role="button" aria-label="' +
|
||||||
|
formatTime(c.startTime) +
|
||||||
|
': ' +
|
||||||
|
c.text +
|
||||||
|
'">' +
|
||||||
|
'<span class="yaktube-transcript-time">' +
|
||||||
|
formatTime(c.startTime) +
|
||||||
|
'</span>' +
|
||||||
|
'<span class="yaktube-transcript-text">' +
|
||||||
|
c.text +
|
||||||
|
'</span>' +
|
||||||
|
'</li>';
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
listHtml =
|
||||||
|
'<div class="yaktube-transcript-empty" style="padding:24px; text-align:center; color:#aaa;">' +
|
||||||
|
'<p style="font-size:15px; margin-bottom:8px;">📄 Bu video için otomatik altyazı veya transkript henüz hazır değil.</p>' +
|
||||||
|
'<p style="font-size:13px; color:#777;">Video oynatıcısındaki Altyazı (CC) butonunu açarak dili seçebilirsiniz.</p>' +
|
||||||
|
'</div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
panel.innerHTML =
|
||||||
|
'<div class="yaktube-transcript-header">' +
|
||||||
|
'<div style="display:flex; align-items:center; gap:8px;">' +
|
||||||
|
'<span style="font-size:18px;">📜</span>' +
|
||||||
|
'<h3 style="margin:0; font-size:16px; font-weight:700; color:#ff8f37;">Video Transkripti</h3>' +
|
||||||
|
'</div>' +
|
||||||
|
'<div style="display:flex; align-items:center; gap:8px;">' +
|
||||||
|
'<input type="text" id="yaktube-transcript-search" class="yaktube-transcript-search" placeholder="Transkriptte ara..." aria-label="Transkript içinde kelime ara" />' +
|
||||||
|
'<button id="yaktube-transcript-close" class="yaktube-voice-modal-close-btn" aria-label="Transkript panelini kapat">✕</button>' +
|
||||||
|
'</div>' +
|
||||||
|
'</div>' +
|
||||||
|
'<ul id="yaktube-transcript-list" class="yaktube-transcript-list" role="list">' +
|
||||||
|
listHtml +
|
||||||
|
'</ul>';
|
||||||
|
|
||||||
|
var closeBtn = panel.querySelector('#yaktube-transcript-close');
|
||||||
|
if (closeBtn) {
|
||||||
|
closeBtn.addEventListener('click', function () {
|
||||||
|
panel.remove();
|
||||||
|
isTranscriptPanelOpen = false;
|
||||||
|
restoreFocusAfterModal();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Click on cue to jump video
|
||||||
|
panel.querySelectorAll('.yaktube-transcript-item').forEach(function (item) {
|
||||||
|
function jumpToCue() {
|
||||||
|
var start = parseFloat(item.getAttribute('data-start'));
|
||||||
|
var v = getVideoElement();
|
||||||
|
if (v && !isNaN(start)) {
|
||||||
|
v.currentTime = start;
|
||||||
|
if (v.paused) v.play();
|
||||||
|
announce(
|
||||||
|
formatTime(start) + ' konumuna gidildi: ' + item.querySelector('.yaktube-transcript-text').textContent
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
item.addEventListener('click', jumpToCue);
|
||||||
|
item.addEventListener('keydown', function (e) {
|
||||||
|
if (e.key === 'Enter' || e.key === ' ') {
|
||||||
|
e.preventDefault();
|
||||||
|
jumpToCue();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Live search in transcript
|
||||||
|
var searchInp = panel.querySelector('#yaktube-transcript-search');
|
||||||
|
if (searchInp) {
|
||||||
|
searchInp.addEventListener('input', function (e) {
|
||||||
|
var query = (e.target.value || '').toLowerCase().trim();
|
||||||
|
panel.querySelectorAll('.yaktube-transcript-item').forEach(function (item) {
|
||||||
|
var txt = (item.querySelector('.yaktube-transcript-text').textContent || '').toLowerCase();
|
||||||
|
item.style.display = txt.includes(query) ? 'flex' : 'none';
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
var targetWrap = document.querySelector(
|
||||||
|
'#video-wrapper, #videojs-wrapper, .player-container, my-video-watch .player'
|
||||||
|
);
|
||||||
|
if (targetWrap && targetWrap.parentNode) {
|
||||||
|
targetWrap.parentNode.insertBefore(panel, targetWrap.nextSibling);
|
||||||
|
} else {
|
||||||
|
document.body.appendChild(panel);
|
||||||
|
}
|
||||||
|
|
||||||
|
trapFocusInModal(panel);
|
||||||
|
announce(
|
||||||
|
'Transkript paneli açıldı. ' + (cues.length ? cues.length + ' satır metin bulundu.' : 'Altyazı bulunamadı.')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sync transcript highlight with current video time
|
||||||
|
setInterval(function () {
|
||||||
|
if (!isTranscriptPanelOpen) return;
|
||||||
|
var video = getVideoElement();
|
||||||
|
if (!video) return;
|
||||||
|
var curTime = video.currentTime;
|
||||||
|
var panel = document.getElementById('yaktube-transcript-panel');
|
||||||
|
if (!panel) return;
|
||||||
|
|
||||||
|
var items = panel.querySelectorAll('.yaktube-transcript-item');
|
||||||
|
items.forEach(function (item) {
|
||||||
|
var start = parseFloat(item.getAttribute('data-start'));
|
||||||
|
var isActive = Math.abs(curTime - start) < 3;
|
||||||
|
if (isActive && !item.classList.contains('active')) {
|
||||||
|
items.forEach(function (i) {
|
||||||
|
i.classList.remove('active');
|
||||||
|
});
|
||||||
|
item.classList.add('active');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}, 1500);
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// 4. Fediverse Clean Share & Timestamp Generator (Privacy First)
|
||||||
|
// ============================================================================
|
||||||
|
function openCleanShareModal() {
|
||||||
|
var existing = document.getElementById('yaktube-clean-share-modal');
|
||||||
|
if (existing) existing.remove();
|
||||||
|
|
||||||
|
recordFocusBeforeModal();
|
||||||
|
|
||||||
|
var video = getVideoElement();
|
||||||
|
var curSec = video ? Math.floor(video.currentTime) : 0;
|
||||||
|
var cleanUrl = window.location.origin + window.location.pathname;
|
||||||
|
var timestampUrl = cleanUrl + '?start=' + curSec + 's';
|
||||||
|
|
||||||
|
var titleEl = document.querySelector('h1.video-title, my-video-watch h1, .video-name, .title');
|
||||||
|
var videoTitle = titleEl ? titleEl.textContent.trim() : document.title;
|
||||||
|
|
||||||
|
var modal = document.createElement('div');
|
||||||
|
modal.id = 'yaktube-clean-share-modal';
|
||||||
|
modal.className = 'yaktube-feature-modal-backdrop';
|
||||||
|
modal.setAttribute('role', 'dialog');
|
||||||
|
modal.setAttribute('aria-modal', 'true');
|
||||||
|
modal.setAttribute('aria-labelledby', 'yaktube-share-title');
|
||||||
|
|
||||||
|
modal.innerHTML =
|
||||||
|
'<div class="yaktube-modal-card" style="max-width:480px; background:#181824; border:1px solid rgba(255,143,55,0.4); border-radius:18px; padding:24px; color:#fff; box-shadow:0 16px 40px rgba(0,0,0,0.8);">' +
|
||||||
|
'<div style="display:flex; justify-content:space-between; align-items:center; margin-bottom:16px;">' +
|
||||||
|
'<h3 id="yaktube-share-title" style="margin:0; font-size:18px; color:#ff8f37;">🔗 Temiz ve Federe Paylaşım</h3>' +
|
||||||
|
'<button id="yaktube-share-close" class="yaktube-voice-modal-close-btn" aria-label="Kapat">✕</button>' +
|
||||||
|
'</div>' +
|
||||||
|
'<p style="font-size:13px; color:#aaa; margin-bottom:16px;">Tüm reklam ve izleyici parametrelerinden arındırılmış temiz YakTube bağlantısı:</p>' +
|
||||||
|
'<div style="display:flex; flex-direction:column; gap:12px;">' +
|
||||||
|
'<div style="display:flex; align-items:center; gap:8px;">' +
|
||||||
|
'<input type="checkbox" id="yaktube-share-timestamp-chk" style="width:18px; height:18px; accent-color:#ff8f37; cursor:pointer;" />' +
|
||||||
|
'<label for="yaktube-share-timestamp-chk" style="font-size:14px; cursor:pointer;">Şu anki zamandan başlat (<b>' +
|
||||||
|
formatTime(curSec) +
|
||||||
|
'</b>)</label>' +
|
||||||
|
'</div>' +
|
||||||
|
'<div style="display:flex; gap:8px;">' +
|
||||||
|
'<input type="text" id="yaktube-share-url-inp" value="' +
|
||||||
|
cleanUrl +
|
||||||
|
'" readonly style="flex:1; background:#22222e; border:1px solid #444; border-radius:8px; padding:10px 12px; color:#fff; font-size:13px;" aria-label="Paylaşım Bağlantısı" />' +
|
||||||
|
'<button id="yaktube-copy-share-btn" class="yaktube-play-btn" style="padding:10px 16px; white-space:nowrap;" aria-label="Bağlantıyı Panoya Kopyala">📋 Kopyala</button>' +
|
||||||
|
'</div>' +
|
||||||
|
'<div style="margin-top:8px; display:flex; gap:8px; flex-wrap:wrap;">' +
|
||||||
|
'<a id="yaktube-mastodon-share" target="_blank" rel="noopener noreferrer" class="yaktube-player-action-btn" style="text-decoration:none; display:inline-flex; align-items:center; gap:6px;">🐘 Mastodon / Fediverse</a>' +
|
||||||
|
'<a id="yaktube-whatsapp-share" target="_blank" rel="noopener noreferrer" class="yaktube-player-action-btn" style="text-decoration:none; display:inline-flex; align-items:center; gap:6px;">💬 WhatsApp</a>' +
|
||||||
|
'</div>' +
|
||||||
|
'</div>' +
|
||||||
|
'</div>';
|
||||||
|
|
||||||
|
var closeBtn = modal.querySelector('#yaktube-share-close');
|
||||||
|
if (closeBtn) {
|
||||||
|
closeBtn.addEventListener('click', function () {
|
||||||
|
modal.remove();
|
||||||
|
restoreFocusAfterModal();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
var chk = modal.querySelector('#yaktube-share-timestamp-chk');
|
||||||
|
var inp = modal.querySelector('#yaktube-share-url-inp');
|
||||||
|
var mastodonLink = modal.querySelector('#yaktube-mastodon-share');
|
||||||
|
var waLink = modal.querySelector('#yaktube-whatsapp-share');
|
||||||
|
|
||||||
|
function updateShareLinks() {
|
||||||
|
var finalUrl = chk.checked ? timestampUrl : cleanUrl;
|
||||||
|
inp.value = finalUrl;
|
||||||
|
var shareText = encodeURIComponent(videoTitle + ' - YakTube: ' + finalUrl);
|
||||||
|
if (mastodonLink) mastodonLink.href = 'https://mastodonshare.com/?text=' + shareText;
|
||||||
|
if (waLink) waLink.href = 'https://api.whatsapp.com/send?text=' + shareText;
|
||||||
|
}
|
||||||
|
chk.addEventListener('change', updateShareLinks);
|
||||||
|
updateShareLinks();
|
||||||
|
|
||||||
|
modal.querySelector('#yaktube-copy-share-btn').addEventListener('click', function () {
|
||||||
|
inp.select();
|
||||||
|
navigator.clipboard
|
||||||
|
.writeText(inp.value)
|
||||||
|
.then(function () {
|
||||||
|
announce('Temiz paylaşım bağlantısı panoya kopyalandı.');
|
||||||
|
showQuickToast('📋 Bağlantı Kopyalandı!');
|
||||||
|
})
|
||||||
|
.catch(function () {
|
||||||
|
document.execCommand('copy');
|
||||||
|
announce('Temiz paylaşım bağlantısı kopyalandı.');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
document.body.appendChild(modal);
|
||||||
|
trapFocusInModal(modal);
|
||||||
|
announce('Paylaşım penceresi açıldı. Kapatmak için Escape tuşuna basın.');
|
||||||
|
}
|
||||||
|
|
||||||
|
// ============================================================================
|
||||||
|
// 5. F6 Landmark Cycle Navigation (WCAG 2.2 AAA Quick Switch)
|
||||||
|
// ============================================================================
|
||||||
|
var landmarkIndex = 0;
|
||||||
|
function cycleLandmarks(reverse) {
|
||||||
|
var landmarks = [
|
||||||
|
{ name: 'Başlık ve Ana Arama', selector: 'header, my-header, #yaktube-search-input' },
|
||||||
|
{ name: 'Kategori Çipleri', selector: '#yaktube-home-categories, .yaktube-categories-bar' },
|
||||||
|
{ name: 'Video Oynatıcı Alanı', selector: '#videojs-wrapper, .video-js, #video-wrapper' },
|
||||||
|
{ name: 'Video Araç Çubuğu', selector: '#yaktube-player-action-bar' },
|
||||||
|
{ name: 'Video Açıklaması ve Bilgiler', selector: 'my-video-watch-description, .video-info, .video-bottom' },
|
||||||
|
{ name: 'Yorumlar ve Tartışmalar', selector: 'my-video-comments, .comments' },
|
||||||
|
{ name: 'Önerilen Videolar', selector: 'my-video-watch-related, .related-videos, #yaktube-ondemand-container' }
|
||||||
|
];
|
||||||
|
|
||||||
|
var validLandmarks = landmarks
|
||||||
|
.map(function (item) {
|
||||||
|
return { name: item.name, el: document.querySelector(item.selector) };
|
||||||
|
})
|
||||||
|
.filter(function (item) {
|
||||||
|
return !!item.el && item.el.offsetParent !== null;
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!validLandmarks.length) {
|
||||||
|
announce('Sayfada gezinilebilir alan bulunamadı.');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (reverse) {
|
||||||
|
landmarkIndex = (landmarkIndex - 1 + validLandmarks.length) % validLandmarks.length;
|
||||||
|
} else {
|
||||||
|
landmarkIndex = (landmarkIndex + 1) % validLandmarks.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
var target = validLandmarks[landmarkIndex];
|
||||||
|
if (target && target.el) {
|
||||||
|
target.el.setAttribute('tabindex', '-1');
|
||||||
|
target.el.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||||
|
target.el.focus();
|
||||||
|
announce('Bölgeye atlandı: ' + target.name);
|
||||||
|
showQuickToast('🎯 ' + target.name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function toggleShortcutsModal() {
|
function toggleShortcutsModal() {
|
||||||
var modal = document.getElementById('yaktube-shortcuts-dialog');
|
var modal = document.getElementById('yaktube-shortcuts-dialog');
|
||||||
if (modal) {
|
if (modal) {
|
||||||
@@ -1082,6 +1550,7 @@ try {
|
|||||||
announce('Klavye kısayolları yardım penceresi açıldı. Kapatmak için Escape tuşuna basın.');
|
announce('Klavye kısayolları yardım penceresi açıldı. Kapatmak için Escape tuşuna basın.');
|
||||||
var closeBtn = document.getElementById('yaktube-shortcuts-close');
|
var closeBtn = document.getElementById('yaktube-shortcuts-close');
|
||||||
if (closeBtn) closeBtn.focus();
|
if (closeBtn) closeBtn.focus();
|
||||||
|
trapFocusInModal(modal);
|
||||||
} else {
|
} else {
|
||||||
modal.style.display = 'none';
|
modal.style.display = 'none';
|
||||||
announce('Yardım penceresi kapatıldı.');
|
announce('Yardım penceresi kapatıldı.');
|
||||||
@@ -1112,7 +1581,9 @@ try {
|
|||||||
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">Alt + M</span> veya <span class="yaktube-kbd">M</span></td><td>Sesi Kapat / Aç (Mute)</td></tr>' +
|
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">Alt + M</span> veya <span class="yaktube-kbd">M</span></td><td>Sesi Kapat / Aç (Mute)</td></tr>' +
|
||||||
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">Alt + T</span> veya <span class="yaktube-kbd">T</span></td><td>Sinema / Tiyatro Modu</td></tr>' +
|
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">Alt + T</span> veya <span class="yaktube-kbd">T</span></td><td>Sinema / Tiyatro Modu</td></tr>' +
|
||||||
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">Alt + I</span> veya <span class="yaktube-kbd">I</span></td><td>Hızlı Video Bilgisi & İstatistikler</td></tr>' +
|
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">Alt + I</span> veya <span class="yaktube-kbd">I</span></td><td>Hızlı Video Bilgisi & İstatistikler</td></tr>' +
|
||||||
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">Alt + C</span> veya <span class="yaktube-kbd">C</span></td><td>Altyazıları Aç / Kapat</td></tr>' +
|
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">Alt + C</span></td><td>📜 Canlı Video Transkript Panelini Aç / Kapat</td></tr>' +
|
||||||
|
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">Alt + O</span></td><td>📻 Yalnızca Ses & Ekran Karartma Modu</td></tr>' +
|
||||||
|
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">F6</span> / <span class="yaktube-kbd">Shift + F6</span></td><td>🎯 Mantıksal Bölge Gezinmesi (Landmarks)</td></tr>' +
|
||||||
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">Alt + U</span></td><td>⏱️ Uyku Zamanlayıcısı (Sleep Timer)</td></tr>' +
|
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">Alt + U</span></td><td>⏱️ Uyku Zamanlayıcısı (Sleep Timer)</td></tr>' +
|
||||||
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">Alt + Q</span></td><td>📱 Telefonda Devam Et (QR Kod)</td></tr>' +
|
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">Alt + Q</span></td><td>📱 Telefonda Devam Et (QR Kod)</td></tr>' +
|
||||||
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">Alt + .</span> / <span class="yaktube-kbd">Alt + ,</span></td><td>Oynatma hızını artır / azalt</td></tr>' +
|
'<tr style="border-bottom:1px solid rgba(255,255,255,0.05);"><td style="padding:8px 0;"><span class="yaktube-kbd">Alt + .</span> / <span class="yaktube-kbd">Alt + ,</span></td><td>Oynatma hızını artır / azalt</td></tr>' +
|
||||||
@@ -1960,6 +2431,15 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function injectControlBarSeekButtons(playerWrapper) {
|
function injectControlBarSeekButtons(playerWrapper) {
|
||||||
|
// A11y: Video.js büyük oynat butonunu ve denetim çubuğu butonlarını ekran okuyuculara erişilebilir kıl
|
||||||
|
// big-play-button custom label removed per user preference
|
||||||
|
var playBtn = (playerWrapper || document).querySelector('.vjs-play-control');
|
||||||
|
if (playBtn && !playBtn.hasAttribute('data-yaktube-a11y-label')) {
|
||||||
|
playBtn.setAttribute('data-yaktube-a11y-label', 'true');
|
||||||
|
var videoEl = getVideoElement();
|
||||||
|
var isPaused = videoEl ? videoEl.paused : true;
|
||||||
|
playBtn.setAttribute('aria-label', isPaused ? 'Oynat (Boşluk veya K)' : 'Duraklat (Boşluk veya K)');
|
||||||
|
}
|
||||||
var controlBar = (playerWrapper || document).querySelector('.vjs-control-bar');
|
var controlBar = (playerWrapper || document).querySelector('.vjs-control-bar');
|
||||||
if (!controlBar) return;
|
if (!controlBar) return;
|
||||||
|
|
||||||
@@ -2199,7 +2679,7 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Left Arrow or J: Rewind 10s
|
// Left Arrow or J: Rewind 10s
|
||||||
if (e.key === 'ArrowLeft' || e.key === 'j' || e.key === 'J') {
|
if ((e.key === 'ArrowLeft' && !e.altKey) || e.key === 'j' || e.key === 'J') {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
video.currentTime = Math.max(0, video.currentTime - 10);
|
video.currentTime = Math.max(0, video.currentTime - 10);
|
||||||
@@ -2209,7 +2689,7 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Right Arrow or L: Forward 10s
|
// Right Arrow or L: Forward 10s
|
||||||
if (e.key === 'ArrowRight' || e.key === 'l' || e.key === 'L') {
|
if ((e.key === 'ArrowRight' && !e.altKey) || e.key === 'l' || e.key === 'L') {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
video.currentTime = Math.min(video.duration || 999999, video.currentTime + 10);
|
video.currentTime = Math.min(video.duration || 999999, video.currentTime + 10);
|
||||||
@@ -2349,11 +2829,15 @@ try {
|
|||||||
|
|
||||||
bar.innerHTML =
|
bar.innerHTML =
|
||||||
'<span class="yaktube-player-bar-label">🛠️ Video Araçları:</span>' +
|
'<span class="yaktube-player-bar-label">🛠️ Video Araçları:</span>' +
|
||||||
|
'<button id="yaktube-bar-back-btn" class="yaktube-player-action-btn" aria-label="Önceki Sayfaya Geri Dön (Alt+Sol Ok)" title="Önceki Sayfaya Geri Dön (Alt+Sol Ok)">⬅️ Geri Dön</button>' +
|
||||||
'<button id="yaktube-bar-speed-btn" class="yaktube-player-action-btn" aria-label="Oynatma Hızını Değiştir (Alt+.)">⚡ Hız</button>' +
|
'<button id="yaktube-bar-speed-btn" class="yaktube-player-action-btn" aria-label="Oynatma Hızını Değiştir (Alt+.)">⚡ Hız</button>' +
|
||||||
'<button id="yaktube-bar-sleep-btn" class="yaktube-player-action-btn" aria-label="Uyku Zamanlayıcısı (Alt+U)">⏱️ Uyku</button>' +
|
'<button id="yaktube-bar-sleep-btn" class="yaktube-player-action-btn" aria-label="Uyku Zamanlayıcısı (Alt+U)">⏱️ Uyku</button>' +
|
||||||
'<button id="yaktube-bar-qr-btn" class="yaktube-player-action-btn" aria-label="Telefonda Devam Et / QR Kod (Alt+Q)">📱 Telefonda Aç</button>' +
|
'<button id="yaktube-bar-qr-btn" class="yaktube-player-action-btn" aria-label="Telefonda Devam Et / QR Kod (Alt+Q)">📱 Telefonda Aç</button>' +
|
||||||
'<button id="yaktube-bar-theater-btn" class="yaktube-player-action-btn" aria-label="Sinema Modunu Aç/Kapat (Alt+T)">🎭 Sinema</button>' +
|
'<button id="yaktube-bar-theater-btn" class="yaktube-player-action-btn" aria-label="Sinema Modunu Aç/Kapat (Alt+T)">🎭 Sinema</button>' +
|
||||||
'<button id="yaktube-bar-info-btn" class="yaktube-player-action-btn" aria-label="Video Bilgisi ve İstatistikleri (Alt+I)">📊 Bilgi</button>' +
|
'<button id="yaktube-bar-info-btn" class="yaktube-player-action-btn" aria-label="Video Bilgisi ve İstatistikleri (Alt+I)">📊 Bilgi</button>' +
|
||||||
|
'<button id="yaktube-bar-audio-btn" class="yaktube-player-action-btn" aria-label="Yalnızca Ses ve Ekran Karartma Modu (Alt+O)" title="Yalnızca Ses & Ekran Karart (Alt+O)">📻 Ses Modu</button>' +
|
||||||
|
'<button id="yaktube-bar-transcript-btn" class="yaktube-player-action-btn" aria-label="Canlı Video Transkripti (Alt+C)" title="Transkript (Alt+C)">📜 Transkript</button>' +
|
||||||
|
'<button id="yaktube-bar-share-btn" class="yaktube-player-action-btn" aria-label="Temiz Fediverse Paylaşımı (Alt+S)" title="Temiz Paylaşım (Alt+S)">🔗 Paylaş</button>' +
|
||||||
'<button id="yaktube-bar-help-btn" class="yaktube-player-action-btn" aria-label="Kısayol Kılavuzu (Alt+H veya F1)">⌨️ Kısayollar</button>';
|
'<button id="yaktube-bar-help-btn" class="yaktube-player-action-btn" aria-label="Kısayol Kılavuzu (Alt+H veya F1)">⌨️ Kısayollar</button>';
|
||||||
|
|
||||||
var playerWrap = document.querySelector(
|
var playerWrap = document.querySelector(
|
||||||
@@ -2375,6 +2859,17 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Attach button actions
|
// Attach button actions
|
||||||
|
var backBtn = bar.querySelector('#yaktube-bar-back-btn');
|
||||||
|
if (backBtn) {
|
||||||
|
backBtn.addEventListener('click', function () {
|
||||||
|
if (window.history.length > 1) {
|
||||||
|
window.history.back();
|
||||||
|
} else {
|
||||||
|
window.location.href = '/videos/overview';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
bar.querySelector('#yaktube-bar-speed-btn').addEventListener('click', function () {
|
bar.querySelector('#yaktube-bar-speed-btn').addEventListener('click', function () {
|
||||||
adjustPlaybackSpeed(true);
|
adjustPlaybackSpeed(true);
|
||||||
});
|
});
|
||||||
@@ -2403,6 +2898,27 @@ try {
|
|||||||
showQuickVideoInfo();
|
showQuickVideoInfo();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var audioBtn = bar.querySelector('#yaktube-bar-audio-btn');
|
||||||
|
if (audioBtn) {
|
||||||
|
audioBtn.addEventListener('click', function () {
|
||||||
|
toggleAudioOnlyMode();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
var transcriptBtn = bar.querySelector('#yaktube-bar-transcript-btn');
|
||||||
|
if (transcriptBtn) {
|
||||||
|
transcriptBtn.addEventListener('click', function () {
|
||||||
|
openTranscriptPanel();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
var shareBtn = bar.querySelector('#yaktube-bar-share-btn');
|
||||||
|
if (shareBtn) {
|
||||||
|
shareBtn.addEventListener('click', function () {
|
||||||
|
openCleanShareModal();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
bar.querySelector('#yaktube-bar-help-btn').addEventListener('click', function () {
|
bar.querySelector('#yaktube-bar-help-btn').addEventListener('click', function () {
|
||||||
toggleShortcutsModal();
|
toggleShortcutsModal();
|
||||||
});
|
});
|
||||||
@@ -2499,6 +3015,27 @@ try {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// F6 or Shift+F6: Landmark Navigation (WCAG 2.2 AAA)
|
||||||
|
if (e.key === 'F6') {
|
||||||
|
e.preventDefault();
|
||||||
|
cycleLandmarks(e.shiftKey);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Audio-Only Mode: Alt+O
|
||||||
|
if (e.altKey && (e.key === 'o' || e.key === 'O') && !isInputFocused()) {
|
||||||
|
e.preventDefault();
|
||||||
|
toggleAudioOnlyMode();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Live Transcript: Alt+C
|
||||||
|
if (e.altKey && (e.key === 'c' || e.key === 'C') && !isInputFocused()) {
|
||||||
|
e.preventDefault();
|
||||||
|
openTranscriptPanel();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Voice Search Open: Alt+V or Shift+V
|
// Voice Search Open: Alt+V or Shift+V
|
||||||
if (
|
if (
|
||||||
((e.altKey && (e.key === 'v' || e.key === 'V')) || (e.shiftKey && (e.key === 'v' || e.key === 'V'))) &&
|
((e.altKey && (e.key === 'v' || e.key === 'V')) || (e.shiftKey && (e.key === 'v' || e.key === 'V'))) &&
|
||||||
@@ -2541,11 +3078,11 @@ try {
|
|||||||
announce('10 saniye ileri sarıldı. Konum: ' + formatTime(video.currentTime));
|
announce('10 saniye ileri sarıldı. Konum: ' + formatTime(video.currentTime));
|
||||||
}
|
}
|
||||||
// Seek 5s Back / Forward (ArrowLeft / ArrowRight or Alt+Left/Right)
|
// Seek 5s Back / Forward (ArrowLeft / ArrowRight or Alt+Left/Right)
|
||||||
else if (e.key === 'ArrowLeft' || (alt && e.key === 'ArrowLeft')) {
|
else if (e.key === 'ArrowLeft' && !alt) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
video.currentTime = Math.max(0, video.currentTime - 5);
|
video.currentTime = Math.max(0, video.currentTime - 5);
|
||||||
announce('5 saniye geri sarıldı. Konum: ' + formatTime(video.currentTime));
|
announce('5 saniye geri sarıldı. Konum: ' + formatTime(video.currentTime));
|
||||||
} else if (e.key === 'ArrowRight' || (alt && e.key === 'ArrowRight')) {
|
} else if (e.key === 'ArrowRight' && !alt) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
video.currentTime = Math.min(video.duration || 99999, video.currentTime + 5);
|
video.currentTime = Math.min(video.duration || 99999, video.currentTime + 5);
|
||||||
announce('5 saniye ileri sarıldı. Konum: ' + formatTime(video.currentTime));
|
announce('5 saniye ileri sarıldı. Konum: ' + formatTime(video.currentTime));
|
||||||
@@ -3087,6 +3624,9 @@ try {
|
|||||||
if (d && typeof d.guestImportLimit === 'number') {
|
if (d && typeof d.guestImportLimit === 'number') {
|
||||||
cachedGuestImportLimit = d.guestImportLimit;
|
cachedGuestImportLimit = d.guestImportLimit;
|
||||||
}
|
}
|
||||||
|
if (d && typeof d.yaknetSsoEnabled === 'boolean') {
|
||||||
|
cachedYakNetSsoEnabled = d.yaknetSsoEnabled;
|
||||||
|
}
|
||||||
if (d && Array.isArray(d.categories) && d.categories.length > 0) {
|
if (d && Array.isArray(d.categories) && d.categories.length > 0) {
|
||||||
cachedCategories = d.categories;
|
cachedCategories = d.categories;
|
||||||
try {
|
try {
|
||||||
@@ -4505,9 +5045,12 @@ try {
|
|||||||
'<div style="display: flex; align-items: center; gap: 8px;">';
|
'<div style="display: flex; align-items: center; gap: 8px;">';
|
||||||
|
|
||||||
if (loggedIn) {
|
if (loggedIn) {
|
||||||
|
var isYakNet = isYakNetSsoEnabled();
|
||||||
var syncTitle = syncEnabled
|
var syncTitle = syncEnabled
|
||||||
? 'YakNet Bulut Eşitlemesi Aktif (Tüm cihazlarınızda senkronize edilir. Kapatmak için tıklayın.)'
|
? isYakNet
|
||||||
: 'Eşitleme Kapalı (Aramalar sadece bu cihazda saklanır. Açmak için tıklayın.)';
|
? 'YakNet Bulut Eşitlemesi Aktif (Tüm cihazlarınızda senkronize edilir)'
|
||||||
|
: 'Hesap Arama Eşitlemesi Aktif (Sunucu hesabınızla senkronize edilir)'
|
||||||
|
: 'Eşitleme Kapalı (Aramalar sadece bu cihazda saklanır)';
|
||||||
var syncText = syncEnabled ? '☁️ Eşitleme: Açık' : '☁️ Eşitleme: Kapalı';
|
var syncText = syncEnabled ? '☁️ Eşitleme: Açık' : '☁️ Eşitleme: Kapalı';
|
||||||
var syncBg = syncEnabled ? '#0f766e' : '#334155';
|
var syncBg = syncEnabled ? '#0f766e' : '#334155';
|
||||||
var syncColor = syncEnabled ? '#5eead4' : '#94a3b8';
|
var syncColor = syncEnabled ? '#5eead4' : '#94a3b8';
|
||||||
@@ -5590,6 +6133,11 @@ try {
|
|||||||
headerButtons.prepend(installBtn);
|
headerButtons.prepend(installBtn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function isYakNetSsoEnabled() {
|
||||||
|
if (cachedYakNetSsoEnabled !== null) return cachedYakNetSsoEnabled;
|
||||||
|
return isOfficialYakTubeServer();
|
||||||
|
}
|
||||||
|
|
||||||
function isOfficialYakTubeServer() {
|
function isOfficialYakTubeServer() {
|
||||||
var host = (window.location.hostname || '').toLowerCase();
|
var host = (window.location.hostname || '').toLowerCase();
|
||||||
// Sadece ve sadece resmi YakTube alan adında veya yerel test ortamında çalışsın
|
// Sadece ve sadece resmi YakTube alan adında veya yerel test ortamında çalışsın
|
||||||
|
|||||||
@@ -178,17 +178,53 @@ function isContentBlocked(text, list = DEFAULT_BLOCKED_KEYWORDS) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function register({ getRouter, registerSetting, settingsManager, peertubeHelpers, logger }) {
|
async function register({ registerHook, getRouter, registerSetting, settingsManager, peertubeHelpers, logger }) {
|
||||||
const router = getRouter();
|
const router = getRouter();
|
||||||
|
|
||||||
|
// YakTube Bildirim Filtresi: Başarılı video içe aktarımları (type 7) bildirim kutusunu doldurmasın,
|
||||||
|
// Sadece başarısız olanlar (type 8 / MY_VIDEO_IMPORT_ERROR) bildirim olarak düşsün
|
||||||
|
if (typeof registerHook === 'function') {
|
||||||
|
registerHook({
|
||||||
|
target: 'filter:notifier.notification.enabled.result',
|
||||||
|
handler: async (result, { notification }) => {
|
||||||
|
if (notification && (notification.type === 7 || notification.type === 'my-video-import-success')) {
|
||||||
|
return {
|
||||||
|
webNotificationEnabled: false,
|
||||||
|
emailNotificationEnabled: false
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (logger)
|
||||||
|
logger.info(
|
||||||
|
'[YakTube OnDemand] Registered filter:notifier.notification.enabled.result (suppressing successful import notifications).'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
let guestImportLimit = 5;
|
let guestImportLimit = 5;
|
||||||
let maxDiskUsagePercent = 85;
|
let maxDiskUsagePercent = 85;
|
||||||
|
let yaknetSsoEnabled = true;
|
||||||
let customChannelId = '';
|
let customChannelId = '';
|
||||||
let customYtDlpPath = '';
|
let customYtDlpPath = '';
|
||||||
let safeSearchEnabled = true;
|
let safeSearchEnabled = true;
|
||||||
let blockedKeywordsList = [...DEFAULT_BLOCKED_KEYWORDS];
|
let blockedKeywordsList = [...DEFAULT_BLOCKED_KEYWORDS];
|
||||||
|
|
||||||
if (typeof registerSetting === 'function') {
|
if (typeof registerSetting === 'function') {
|
||||||
|
registerSetting({
|
||||||
|
name: 'enable-yaknet-sso',
|
||||||
|
label: 'YakNet SSO ve Merkezi Hesap Entegrasyonu',
|
||||||
|
type: 'select',
|
||||||
|
options: [
|
||||||
|
{ label: 'Açık (Resmi YakNet Giriş & Hesap Entegrasyonu)', value: 'true' },
|
||||||
|
{ label: 'Kapalı (Standart Bağımsız PeerTube Girişi)', value: 'false' }
|
||||||
|
],
|
||||||
|
description:
|
||||||
|
'YakNet SSO ile tek tıkla oturum açma, YakNet hesap kartı ve merkezi arama geçmişi eşitlemesini etkinleştirir. Bu özelliği kullanmak için peertube-plugin-auth-yaknet eklentisinin de kurulu olması önerilir. Kapatıldığında platform standart bağımsız PeerTube hesap sistemiyle çalışır.',
|
||||||
|
private: false,
|
||||||
|
default: 'true'
|
||||||
|
});
|
||||||
|
|
||||||
registerSetting({
|
registerSetting({
|
||||||
name: 'safe-search-enabled',
|
name: 'safe-search-enabled',
|
||||||
label: 'Güvenli Okul & Aile Araması (SafeSearch)',
|
label: 'Güvenli Okul & Aile Araması (SafeSearch)',
|
||||||
@@ -529,6 +565,15 @@ async function register({ getRouter, registerSetting, settingsManager, peertubeH
|
|||||||
parsedHomeCategories = parseHomeCategories(rawHomeCategories);
|
parsedHomeCategories = parseHomeCategories(rawHomeCategories);
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const ssoVal = await settingsManager.getSetting('enable-yaknet-sso');
|
||||||
|
if (ssoVal !== undefined && ssoVal !== null) {
|
||||||
|
yaknetSsoEnabled = String(ssoVal).trim() !== 'false';
|
||||||
|
} else {
|
||||||
|
yaknetSsoEnabled = true;
|
||||||
|
}
|
||||||
|
} catch (e) {}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const safeVal = await settingsManager.getSetting('safe-search-enabled');
|
const safeVal = await settingsManager.getSetting('safe-search-enabled');
|
||||||
if (safeVal !== undefined && safeVal !== null) {
|
if (safeVal !== undefined && safeVal !== null) {
|
||||||
@@ -965,6 +1010,7 @@ async function register({ getRouter, registerSetting, settingsManager, peertubeH
|
|||||||
await loadPluginSettings();
|
await loadPluginSettings();
|
||||||
return res.json({
|
return res.json({
|
||||||
ok: true,
|
ok: true,
|
||||||
|
yaknetSsoEnabled,
|
||||||
guestImportLimit,
|
guestImportLimit,
|
||||||
maxDiskUsagePercent,
|
maxDiskUsagePercent,
|
||||||
safeSearchEnabled,
|
safeSearchEnabled,
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "peertube-plugin-yaktube-ondemand",
|
"name": "peertube-plugin-yaktube-ondemand",
|
||||||
"version": "1.7.1",
|
"version": "1.7.6",
|
||||||
"description": "Accessible On-Demand YouTube Import, Live Streams, Smart Recommendations, Sleep Timer, Touch Gestures, Voice Assistant & A11y Engine for PeerTube",
|
"description": "Accessible On-Demand YouTube Import, Live Streams, Smart Recommendations, Sleep Timer, Touch Gestures, Voice Assistant & A11y Engine for PeerTube",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"library": "./main.js",
|
"library": "./main.js",
|
||||||
@@ -48,4 +48,4 @@
|
|||||||
"homepage": "https://yaktube.yakhub.com.tr",
|
"homepage": "https://yaktube.yakhub.com.tr",
|
||||||
"bugs": "https://github.com/yakistir98/peertube-plugin-yaktube-ondemand/issues",
|
"bugs": "https://github.com/yakistir98/peertube-plugin-yaktube-ondemand/issues",
|
||||||
"license": "AGPL-3.0-or-later"
|
"license": "AGPL-3.0-or-later"
|
||||||
}
|
}
|
||||||
@@ -1763,3 +1763,178 @@ my-date-toggle .date-toggle:focus-visible {
|
|||||||
background-color: rgba(255, 143, 55, 0.15) !important;
|
background-color: rgba(255, 143, 55, 0.15) !important;
|
||||||
outline: 2px solid #ff8f37 !important;
|
outline: 2px solid #ff8f37 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* === YakTube WCAG 2.1 AAA Video Player Accessibility: Keep Controls Accessible === */
|
||||||
|
|
||||||
|
/* 1. Video duraklatıldığında veya klavye/ekran okuyucu odaklandığında denetim çubuğunu görünür tut */
|
||||||
|
.video-js.vjs-paused .vjs-control-bar,
|
||||||
|
.video-js:focus-within .vjs-control-bar,
|
||||||
|
.video-js .vjs-control-bar:focus-within,
|
||||||
|
.video-js.vjs-user-inactive.vjs-paused .vjs-control-bar {
|
||||||
|
opacity: 1 !important;
|
||||||
|
visibility: visible !important;
|
||||||
|
display: flex !important;
|
||||||
|
pointer-events: auto !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 2. Büyük merkez oynatma düğmesi PeerTube varsayılanında bırakıldı */
|
||||||
|
|
||||||
|
/* 3. Tüm Video.js düğmelerinin klavye odağını belirgin kıl */
|
||||||
|
.video-js .vjs-control-bar .vjs-button:focus,
|
||||||
|
.video-js .vjs-control-bar .vjs-button:focus-visible,
|
||||||
|
.video-js .vjs-big-play-button:focus,
|
||||||
|
.video-js .vjs-big-play-button:focus-visible {
|
||||||
|
outline: 3px solid #ff8f37 !important;
|
||||||
|
outline-offset: 2px !important;
|
||||||
|
box-shadow: 0 0 10px rgba(255, 143, 55, 0.8) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* === YakTube NLnet WCAG 2.2 AAA & Privacy Suite Styles === */
|
||||||
|
|
||||||
|
/* 1. Yalnızca Ses ve Ekran Karartma Modu */
|
||||||
|
.yaktube-audio-blank-overlay {
|
||||||
|
position: fixed !important;
|
||||||
|
top: 0 !important;
|
||||||
|
left: 0 !important;
|
||||||
|
width: 100vw !important;
|
||||||
|
height: 100vh !important;
|
||||||
|
background: #000 !important;
|
||||||
|
z-index: 9999999 !important;
|
||||||
|
display: flex !important;
|
||||||
|
align-items: center !important;
|
||||||
|
justify-content: center !important;
|
||||||
|
text-align: center !important;
|
||||||
|
color: #fff !important;
|
||||||
|
padding: 24px !important;
|
||||||
|
box-sizing: border-box !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-audio-blank-content {
|
||||||
|
background: rgba(20, 20, 28, 0.95) !important;
|
||||||
|
border: 1px solid rgba(255, 143, 55, 0.5) !important;
|
||||||
|
border-radius: 20px !important;
|
||||||
|
padding: 32px 24px !important;
|
||||||
|
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9) !important;
|
||||||
|
display: flex !important;
|
||||||
|
flex-direction: column !important;
|
||||||
|
align-items: center !important;
|
||||||
|
animation: yaktube-fade-in 0.25s ease-out !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-audio-action-btn {
|
||||||
|
background: linear-gradient(135deg, #ff8f37 0%, #ff5e3a 100%) !important;
|
||||||
|
color: #fff !important;
|
||||||
|
border: none !important;
|
||||||
|
border-radius: 10px !important;
|
||||||
|
padding: 12px 20px !important;
|
||||||
|
font-size: 14px !important;
|
||||||
|
font-weight: 700 !important;
|
||||||
|
cursor: pointer !important;
|
||||||
|
transition:
|
||||||
|
transform 0.15s,
|
||||||
|
opacity 0.15s !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-audio-action-btn:hover,
|
||||||
|
.yaktube-audio-action-btn:focus-visible {
|
||||||
|
transform: scale(1.05) !important;
|
||||||
|
outline: 3px solid #ff8f37 !important;
|
||||||
|
outline-offset: 3px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 2. Erişilebilir Canlı Transkript Paneli */
|
||||||
|
.yaktube-transcript-panel {
|
||||||
|
margin: 16px 0 !important;
|
||||||
|
background: #181824 !important;
|
||||||
|
border: 1px solid rgba(255, 143, 55, 0.35) !important;
|
||||||
|
border-radius: 16px !important;
|
||||||
|
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
|
||||||
|
color: #fff !important;
|
||||||
|
overflow: hidden !important;
|
||||||
|
animation: yaktube-fade-in 0.2s ease-out !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-transcript-header {
|
||||||
|
display: flex !important;
|
||||||
|
justify-content: space-between !important;
|
||||||
|
align-items: center !important;
|
||||||
|
padding: 14px 18px !important;
|
||||||
|
background: rgba(255, 255, 255, 0.04) !important;
|
||||||
|
border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
|
||||||
|
flex-wrap: wrap !important;
|
||||||
|
gap: 10px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-transcript-search {
|
||||||
|
background: #22222e !important;
|
||||||
|
border: 1px solid #444 !important;
|
||||||
|
border-radius: 8px !important;
|
||||||
|
padding: 6px 12px !important;
|
||||||
|
color: #fff !important;
|
||||||
|
font-size: 13px !important;
|
||||||
|
width: 180px !important;
|
||||||
|
outline: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-transcript-search:focus {
|
||||||
|
border-color: #ff8f37 !important;
|
||||||
|
box-shadow: 0 0 8px rgba(255, 143, 55, 0.4) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-transcript-list {
|
||||||
|
list-style: none !important;
|
||||||
|
margin: 0 !important;
|
||||||
|
padding: 8px 12px !important;
|
||||||
|
max-height: 280px !important;
|
||||||
|
overflow-y: auto !important;
|
||||||
|
display: flex !important;
|
||||||
|
flex-direction: column !important;
|
||||||
|
gap: 4px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-transcript-item {
|
||||||
|
display: flex !important;
|
||||||
|
align-items: baseline !important;
|
||||||
|
gap: 12px !important;
|
||||||
|
padding: 8px 12px !important;
|
||||||
|
border-radius: 8px !important;
|
||||||
|
cursor: pointer !important;
|
||||||
|
transition: background 0.15s ease !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-transcript-item:hover,
|
||||||
|
.yaktube-transcript-item:focus-visible {
|
||||||
|
background: rgba(255, 143, 55, 0.15) !important;
|
||||||
|
outline: 2px solid #ff8f37 !important;
|
||||||
|
outline-offset: -2px !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-transcript-item.active {
|
||||||
|
background: rgba(255, 143, 55, 0.25) !important;
|
||||||
|
font-weight: 700 !important;
|
||||||
|
border-left: 4px solid #ff8f37 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-transcript-time {
|
||||||
|
font-family: monospace !important;
|
||||||
|
font-size: 12px !important;
|
||||||
|
color: #ff8f37 !important;
|
||||||
|
background: rgba(255, 143, 55, 0.1) !important;
|
||||||
|
padding: 2px 6px !important;
|
||||||
|
border-radius: 4px !important;
|
||||||
|
flex-shrink: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yaktube-transcript-text {
|
||||||
|
font-size: 14px !important;
|
||||||
|
line-height: 1.45 !important;
|
||||||
|
color: #e5e5e5 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 3. Araç Çubuğu Butonlarının Aktif Hali */
|
||||||
|
.yaktube-player-action-btn.active {
|
||||||
|
background: linear-gradient(135deg, #ff8f37 0%, #ff5e3a 100%) !important;
|
||||||
|
color: #fff !important;
|
||||||
|
border-color: #ff8f37 !important;
|
||||||
|
box-shadow: 0 0 12px rgba(255, 143, 55, 0.6) !important;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user