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 | |
|---|---|---|---|
|
|
e7dc5136e5 | ||
|
|
1aba41c992 | ||
|
|
afaf4ef856 | ||
|
|
52480401c8 | ||
|
|
46a9c8ab8c | ||
|
|
a5568de3cc | ||
|
|
d629c97dd8 | ||
|
|
3016fc6328 |
@@ -2,6 +2,10 @@ try {
|
|||||||
(function () {
|
(function () {
|
||||||
if (window.__YAKTUBE_ENGINE_LOADED__) return;
|
if (window.__YAKTUBE_ENGINE_LOADED__) return;
|
||||||
window.__YAKTUBE_ENGINE_LOADED__ = true;
|
window.__YAKTUBE_ENGINE_LOADED__ = true;
|
||||||
|
try {
|
||||||
|
localStorage.setItem('hide-mobile-msg', 'true');
|
||||||
|
sessionStorage.setItem('hide-mobile-msg', 'true');
|
||||||
|
} catch (e) {}
|
||||||
console.log('[YakTube] YakNet SSO, Custom Branding, A11y & On-Demand Engine Active');
|
console.log('[YakTube] YakNet SSO, Custom Branding, A11y & On-Demand Engine Active');
|
||||||
|
|
||||||
// Dynamic Instance Name Helper
|
// Dynamic Instance Name Helper
|
||||||
@@ -50,6 +54,52 @@ try {
|
|||||||
}, 50);
|
}, 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Load official YakNet Web Component definition
|
||||||
|
if (
|
||||||
|
typeof customElements !== 'undefined' &&
|
||||||
|
!customElements.get('yaknet-account') &&
|
||||||
|
!document.getElementById('yaknet-account-script')
|
||||||
|
) {
|
||||||
|
var s = document.createElement('script');
|
||||||
|
s.id = 'yaknet-account-script';
|
||||||
|
s.src = 'https://auth.yakhub.com.tr/js/yaknet-account.js';
|
||||||
|
s.async = true;
|
||||||
|
document.head.appendChild(s);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Silent background SSO Probe Engine
|
||||||
|
function initSilentSSOProbe() {
|
||||||
|
var token = localStorage.getItem('access_token');
|
||||||
|
var isManualLogout = sessionStorage.getItem('yaknet_manual_logout');
|
||||||
|
if (
|
||||||
|
token ||
|
||||||
|
isManualLogout ||
|
||||||
|
window.location.search.includes('local=true') ||
|
||||||
|
window.location.search.includes('externalAuthError') ||
|
||||||
|
window.location.pathname.includes('/login')
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var iframeId = 'yaknet-sso-iframe-instance';
|
||||||
|
if (!document.getElementById(iframeId)) {
|
||||||
|
var iframe = document.createElement('iframe');
|
||||||
|
iframe.id = iframeId;
|
||||||
|
iframe.src = 'https://auth.yakhub.com.tr/sdk/sso-frame';
|
||||||
|
iframe.title = 'YakNet Oturum Kontrolü';
|
||||||
|
iframe.setAttribute('aria-hidden', 'true');
|
||||||
|
iframe.tabIndex = -1;
|
||||||
|
iframe.style.cssText =
|
||||||
|
'display:none!important;width:0!important;height:0!important;border:0!important;position:absolute!important;pointer-events:none!important;';
|
||||||
|
document.body.appendChild(iframe);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (document.readyState === 'loading') {
|
||||||
|
document.addEventListener('DOMContentLoaded', initSilentSSOProbe);
|
||||||
|
} else {
|
||||||
|
initSilentSSOProbe();
|
||||||
|
}
|
||||||
|
|
||||||
function triggerYakNetOAuth() {
|
function triggerYakNetOAuth() {
|
||||||
sessionStorage.removeItem('yaknet_manual_logout');
|
sessionStorage.removeItem('yaknet_manual_logout');
|
||||||
var callbackUrl = 'https://yaktube.yakhub.com.tr/plugins/peertube-plugin-auth-yaknet/router/auth-callback';
|
var callbackUrl = 'https://yaktube.yakhub.com.tr/plugins/peertube-plugin-auth-yaknet/router/auth-callback';
|
||||||
@@ -288,7 +338,7 @@ try {
|
|||||||
var liveWidget = headerRight.querySelector('#yaknet-header-account-widget');
|
var liveWidget = headerRight.querySelector('#yaknet-header-account-widget');
|
||||||
|
|
||||||
if (isAuth) {
|
if (isAuth) {
|
||||||
// Logged In: Show YakNet Profile Menu, Hide default login link
|
// 1. AUTHENTICATED: Hide native login link, Show YakNet Account Profile Menu
|
||||||
if (defaultLoginLink) {
|
if (defaultLoginLink) {
|
||||||
defaultLoginLink.style.display = 'none';
|
defaultLoginLink.style.display = 'none';
|
||||||
defaultLoginLink.setAttribute('aria-hidden', 'true');
|
defaultLoginLink.setAttribute('aria-hidden', 'true');
|
||||||
@@ -333,6 +383,16 @@ try {
|
|||||||
} else {
|
} else {
|
||||||
var el = liveWidget.querySelector('yaknet-account');
|
var el = liveWidget.querySelector('yaknet-account');
|
||||||
if (el) {
|
if (el) {
|
||||||
|
if (el.getAttribute('authenticated') !== 'true' || el.getAttribute('user-name') !== displayName) {
|
||||||
|
el.setAttribute('authenticated', 'true');
|
||||||
|
el.setAttribute('user-name', displayName);
|
||||||
|
el.setAttribute('user-email', emailStr);
|
||||||
|
if (typeof el.syncStateFromAttributes === 'function') {
|
||||||
|
el.syncStateFromAttributes();
|
||||||
|
el.render();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (el.shadowRoot) {
|
if (el.shadowRoot) {
|
||||||
var shadowLogoutBtn =
|
var shadowLogoutBtn =
|
||||||
el.shadowRoot.getElementById('logoutBtn') ||
|
el.shadowRoot.getElementById('logoutBtn') ||
|
||||||
@@ -351,23 +411,16 @@ try {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (el.getAttribute('authenticated') !== 'true' || el.getAttribute('user-name') !== displayName) {
|
|
||||||
el.setAttribute('authenticated', 'true');
|
|
||||||
el.setAttribute('user-name', displayName);
|
|
||||||
el.setAttribute('user-email', emailStr);
|
|
||||||
if (typeof el.syncStateFromAttributes === 'function') {
|
|
||||||
el.syncStateFromAttributes();
|
|
||||||
el.render();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Not Logged In: Remove YakNet widget to eliminate duplicate button, keep PeerTube native login button clean
|
// 2. GUEST / NOT LOGGED IN:
|
||||||
|
// A. Physically remove any <yaknet-account> widget from DOM to guarantee zero shadow DOM duplicate buttons
|
||||||
if (liveWidget) {
|
if (liveWidget) {
|
||||||
liveWidget.remove();
|
liveWidget.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// B. Ensure PeerTube's native login link is the ONLY single accessible login element
|
||||||
if (defaultLoginLink) {
|
if (defaultLoginLink) {
|
||||||
defaultLoginLink.style.display = '';
|
defaultLoginLink.style.display = '';
|
||||||
defaultLoginLink.removeAttribute('aria-hidden');
|
defaultLoginLink.removeAttribute('aria-hidden');
|
||||||
@@ -376,7 +429,7 @@ try {
|
|||||||
defaultLoginLink.tagName.toLowerCase() === 'a' ? defaultLoginLink : defaultLoginLink.querySelector('a');
|
defaultLoginLink.tagName.toLowerCase() === 'a' ? defaultLoginLink : defaultLoginLink.querySelector('a');
|
||||||
if (loginAnchor) {
|
if (loginAnchor) {
|
||||||
loginAnchor.setAttribute('aria-label', 'YakNet ile Giriş Yap');
|
loginAnchor.setAttribute('aria-label', 'YakNet ile Giriş Yap');
|
||||||
loginAnchor.setAttribute('title', 'YakNet Hesabınız ile Giriş Yapın');
|
loginAnchor.setAttribute('title', 'YakNet ile Giriş Yap');
|
||||||
var spanText = loginAnchor.querySelector('span');
|
var spanText = loginAnchor.querySelector('span');
|
||||||
if (spanText) {
|
if (spanText) {
|
||||||
spanText.textContent = 'YakNet ile Giriş Yap';
|
spanText.textContent = 'YakNet ile Giriş Yap';
|
||||||
@@ -514,6 +567,13 @@ try {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Aggressively remove generic Framasoft Open-in-App / Play Store banners
|
// Aggressively remove generic Framasoft Open-in-App / Play Store banners
|
||||||
|
document
|
||||||
|
.querySelectorAll(
|
||||||
|
'.mobile-msg, [class*="mobile-msg"], button[title*="Bu mesajı kapat"], button[aria-label*="Bu mesajı kapat"]'
|
||||||
|
)
|
||||||
|
.forEach(function (m) {
|
||||||
|
m.remove();
|
||||||
|
});
|
||||||
var genericAppBanners = document.querySelectorAll(
|
var genericAppBanners = document.querySelectorAll(
|
||||||
'my-open-app, my-client-app-banner, .open-app-container, .app-banner, [class*="open-app"], [class*="open-in-app"], .mobile-app-banner, my-open-in-app, .app-promotion, a[href*="play.google.com/store/apps/details?id=app.joinpeertube"], a[href*="f-droid.org"]'
|
'my-open-app, my-client-app-banner, .open-app-container, .app-banner, [class*="open-app"], [class*="open-in-app"], .mobile-app-banner, my-open-in-app, .app-promotion, a[href*="play.google.com/store/apps/details?id=app.joinpeertube"], a[href*="f-droid.org"]'
|
||||||
);
|
);
|
||||||
@@ -820,7 +880,22 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getVideoElement() {
|
function getVideoElement() {
|
||||||
return document.querySelector('video');
|
// 1. Direct video tag in DOM
|
||||||
|
var v = document.querySelector('video');
|
||||||
|
if (v) return v;
|
||||||
|
|
||||||
|
// 2. Video inside iframes (e.g. embed player)
|
||||||
|
var iframes = document.querySelectorAll('iframe');
|
||||||
|
for (var i = 0; i < iframes.length; i++) {
|
||||||
|
try {
|
||||||
|
var doc = iframes[i].contentDocument || (iframes[i].contentWindow && iframes[i].contentWindow.document);
|
||||||
|
if (doc) {
|
||||||
|
var iv = doc.querySelector('video');
|
||||||
|
if (iv) return iv;
|
||||||
|
}
|
||||||
|
} catch (e) {}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatTime(seconds) {
|
function formatTime(seconds) {
|
||||||
@@ -3019,8 +3094,8 @@ try {
|
|||||||
(function initBackgroundPlaybackEngine() {
|
(function initBackgroundPlaybackEngine() {
|
||||||
var videoState = {
|
var videoState = {
|
||||||
hasPlayed: false,
|
hasPlayed: false,
|
||||||
pausedByUser: false,
|
explicitlyPausedByClick: false,
|
||||||
pausedAt: null
|
lastPlayTime: 0
|
||||||
};
|
};
|
||||||
|
|
||||||
function attachVideoListeners(video) {
|
function attachVideoListeners(video) {
|
||||||
@@ -3029,21 +3104,14 @@ try {
|
|||||||
|
|
||||||
video.addEventListener('play', function () {
|
video.addEventListener('play', function () {
|
||||||
videoState.hasPlayed = true;
|
videoState.hasPlayed = true;
|
||||||
videoState.pausedByUser = false;
|
videoState.explicitlyPausedByClick = false;
|
||||||
|
videoState.lastPlayTime = Date.now();
|
||||||
updateMediaSessionMetadata(video);
|
updateMediaSessionMetadata(video);
|
||||||
});
|
});
|
||||||
|
|
||||||
video.addEventListener('pause', function () {
|
|
||||||
videoState.pausedAt = Date.now();
|
|
||||||
// If document is visible when paused, it was paused manually by the user
|
|
||||||
if (!document.hidden) {
|
|
||||||
videoState.pausedByUser = true;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
video.addEventListener('ended', function () {
|
video.addEventListener('ended', function () {
|
||||||
videoState.hasPlayed = false;
|
videoState.hasPlayed = false;
|
||||||
videoState.pausedByUser = true;
|
videoState.explicitlyPausedByClick = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
video.addEventListener('timeupdate', function () {
|
video.addEventListener('timeupdate', function () {
|
||||||
@@ -3051,30 +3119,50 @@ try {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleVisibilityChange() {
|
// Hook manual play/pause buttons
|
||||||
if (!document.hidden) return; // Screen is active
|
document.addEventListener(
|
||||||
|
'click',
|
||||||
|
function (e) {
|
||||||
|
var target = e.target;
|
||||||
|
if (!target) return;
|
||||||
|
var btn = target.closest(
|
||||||
|
'.vjs-play-control, button[title*="Duraklat"], button[aria-label*="Duraklat"], #yaktube-bar-play-btn'
|
||||||
|
);
|
||||||
|
if (btn) {
|
||||||
|
var video = getVideoElement();
|
||||||
|
if (video && !video.paused) {
|
||||||
|
videoState.explicitlyPausedByClick = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
true
|
||||||
|
);
|
||||||
|
|
||||||
|
function handleVisibilityChange() {
|
||||||
var video = getVideoElement();
|
var video = getVideoElement();
|
||||||
if (!video) return;
|
if (!video) return;
|
||||||
|
|
||||||
// If user hasn't played or deliberately paused, do not auto-resume
|
// When screen turns off / tab is hidden:
|
||||||
if (!videoState.hasPlayed || videoState.pausedByUser) return;
|
if (document.hidden || document.webkitHidden) {
|
||||||
|
if (videoState.hasPlayed && !videoState.explicitlyPausedByClick) {
|
||||||
var now = Date.now();
|
// Unconditionally keep audio stream active
|
||||||
if (videoState.pausedAt && now - videoState.pausedAt > 1500 && videoState.pausedByUser) {
|
setTimeout(function () {
|
||||||
return;
|
if (video.paused && !videoState.explicitlyPausedByClick) {
|
||||||
}
|
video.play().catch(function () {});
|
||||||
|
}
|
||||||
// Resume playback when screen locks or tab switches
|
}, 100);
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
if (video.paused && !videoState.pausedByUser) {
|
if (video.paused && !videoState.explicitlyPausedByClick) {
|
||||||
video.play().catch(function () {});
|
video.play().catch(function () {});
|
||||||
|
}
|
||||||
|
}, 300);
|
||||||
}
|
}
|
||||||
}, 50);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
document.addEventListener('visibilitychange', handleVisibilityChange, false);
|
document.addEventListener('visibilitychange', handleVisibilityChange, false);
|
||||||
document.addEventListener('webkitvisibilitychange', handleVisibilityChange, false);
|
document.addEventListener('webkitvisibilitychange', handleVisibilityChange, false);
|
||||||
|
window.addEventListener('pagehide', handleVisibilityChange, false);
|
||||||
|
|
||||||
// MediaSession API Integration (Lock Screen, Bluetooth, Smart Watches)
|
// MediaSession API Integration (Lock Screen, Bluetooth, Smart Watches)
|
||||||
function updateMediaSessionMetadata(video) {
|
function updateMediaSessionMetadata(video) {
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "peertube-plugin-yaktube-ondemand",
|
"name": "peertube-plugin-yaktube-ondemand",
|
||||||
"version": "1.4.10",
|
"version": "1.4.18",
|
||||||
"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",
|
||||||
"library": "./main.js",
|
"library": "./main.js",
|
||||||
|
|||||||
@@ -1,3 +1,51 @@
|
|||||||
|
/* 100% Elimination of PeerTube Mobile Open-in-App Banner & Close Button */
|
||||||
|
.mobile-msg,
|
||||||
|
my-header .mobile-msg,
|
||||||
|
[class*='mobile-msg'],
|
||||||
|
button[title*='Bu mesajı kapat'],
|
||||||
|
button[aria-label*='Bu mesajı kapat'],
|
||||||
|
button[title*='Dismiss'],
|
||||||
|
.msg.ellipsis,
|
||||||
|
.peertube-button-link.secondary-button {
|
||||||
|
display: none !important;
|
||||||
|
visibility: hidden !important;
|
||||||
|
height: 0 !important;
|
||||||
|
width: 0 !important;
|
||||||
|
margin: 0 !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
pointer-events: none !important;
|
||||||
|
opacity: 0 !important;
|
||||||
|
position: absolute !important;
|
||||||
|
z-index: -99999 !important;
|
||||||
|
clip: rect(0, 0, 0, 0) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Permanent Aggressive Suppression of Generic JoinPeerTube / Framasoft Open-in-App Banners */
|
||||||
|
my-open-app,
|
||||||
|
my-open-in-app,
|
||||||
|
my-client-app-banner,
|
||||||
|
.open-app-container,
|
||||||
|
.app-banner,
|
||||||
|
[class*='open-app'],
|
||||||
|
[class*='open-in-app'],
|
||||||
|
.mobile-app-banner,
|
||||||
|
.app-promotion,
|
||||||
|
.client-app-banner,
|
||||||
|
a[href*='play.google.com/store/apps/details?id=app.joinpeertube'],
|
||||||
|
a[href*='f-droid.org'],
|
||||||
|
a[href*='joinpeertube'] {
|
||||||
|
display: none !important;
|
||||||
|
visibility: hidden !important;
|
||||||
|
height: 0 !important;
|
||||||
|
width: 0 !important;
|
||||||
|
margin: 0 !important;
|
||||||
|
padding: 0 !important;
|
||||||
|
pointer-events: none !important;
|
||||||
|
opacity: 0 !important;
|
||||||
|
position: absolute !important;
|
||||||
|
z-index: -99999 !important;
|
||||||
|
}
|
||||||
|
|
||||||
/* YakTube Accessibility & On-Demand CSS */
|
/* YakTube Accessibility & On-Demand CSS */
|
||||||
|
|
||||||
:focus-visible {
|
:focus-visible {
|
||||||
|
|||||||
Reference in New Issue
Block a user