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
fix(watch): support PeerTube v8 /w/:slug URLs in transcript and continue watching
This commit is contained in:
@@ -1767,7 +1767,9 @@ try {
|
|||||||
var isTranscriptPanelOpen = false;
|
var isTranscriptPanelOpen = false;
|
||||||
|
|
||||||
function getActiveWatchVideoSlug() {
|
function getActiveWatchVideoSlug() {
|
||||||
var m = window.location.pathname.match(/\/videos\/watch\/([a-zA-Z0-9_-]+)/);
|
var m =
|
||||||
|
window.location.pathname.match(/\/videos\/watch\/([a-zA-Z0-9_-]+)/) ||
|
||||||
|
window.location.pathname.match(/\/w\/([a-zA-Z0-9_-]+)/);
|
||||||
return m ? m[1] : null;
|
return m ? m[1] : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2325,6 +2327,8 @@ try {
|
|||||||
modal.querySelector('#yaktube-queue-clear').addEventListener('click', function () {
|
modal.querySelector('#yaktube-queue-clear').addEventListener('click', function () {
|
||||||
savePlayQueue([]);
|
savePlayQueue([]);
|
||||||
renderDrawer();
|
renderDrawer();
|
||||||
|
var closeEl = modal.querySelector('#yaktube-queue-close');
|
||||||
|
if (closeEl) closeEl.focus();
|
||||||
announce('Çalma sırası tamamen temizlendi.');
|
announce('Çalma sırası tamamen temizlendi.');
|
||||||
});
|
});
|
||||||
modal.querySelectorAll('.yaktube-queue-play-one').forEach(function (b) {
|
modal.querySelectorAll('.yaktube-queue-play-one').forEach(function (b) {
|
||||||
@@ -8970,13 +8974,25 @@ try {
|
|||||||
videoState.hasPlayed = false;
|
videoState.hasPlayed = false;
|
||||||
videoState.explicitlyPausedByClick = true;
|
videoState.explicitlyPausedByClick = true;
|
||||||
try {
|
try {
|
||||||
recordContinueWatchingProgress(video, true);
|
recordContinueWatchingProgress(video, true, true);
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
try {
|
try {
|
||||||
showPostVideoUpNextOverlay();
|
showPostVideoUpNextOverlay();
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
video.addEventListener('pause', function () {
|
||||||
|
try {
|
||||||
|
recordContinueWatchingProgress(video, false, true);
|
||||||
|
} catch (e) {}
|
||||||
|
});
|
||||||
|
|
||||||
|
video.addEventListener('seeked', function () {
|
||||||
|
try {
|
||||||
|
recordContinueWatchingProgress(video, false, true);
|
||||||
|
} catch (e) {}
|
||||||
|
});
|
||||||
|
|
||||||
video.addEventListener('timeupdate', function () {
|
video.addEventListener('timeupdate', function () {
|
||||||
updateMediaSessionPosition(video);
|
updateMediaSessionPosition(video);
|
||||||
if (
|
if (
|
||||||
@@ -8988,7 +9004,7 @@ try {
|
|||||||
video.currentTime = abLoopState.a;
|
video.currentTime = abLoopState.a;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
recordContinueWatchingProgress(video, false);
|
recordContinueWatchingProgress(video, false, false);
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
try {
|
try {
|
||||||
checkSmartPrefetchOnTimeUpdate(video);
|
checkSmartPrefetchOnTimeUpdate(video);
|
||||||
@@ -9159,13 +9175,13 @@ try {
|
|||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
function recordContinueWatchingProgress(video, isEnded) {
|
function recordContinueWatchingProgress(video, isEnded, forceSave) {
|
||||||
if (!video || !isWatchUrl() || isEmbedUrl()) return;
|
if (!video || !isWatchUrl() || isEmbedUrl()) return;
|
||||||
var slug = getActiveWatchVideoSlug();
|
var slug = getActiveWatchVideoSlug();
|
||||||
if (!slug) return;
|
if (!slug) return;
|
||||||
|
|
||||||
var now = Date.now();
|
var now = Date.now();
|
||||||
if (!isEnded && now - lastContinueSaveTs < 4000) return;
|
if (!isEnded && !forceSave && now - lastContinueSaveTs < 4000) return;
|
||||||
|
|
||||||
var dur = Number(video.duration || 0);
|
var dur = Number(video.duration || 0);
|
||||||
var cur = Number(video.currentTime || 0);
|
var cur = Number(video.currentTime || 0);
|
||||||
@@ -9199,7 +9215,7 @@ try {
|
|||||||
|
|
||||||
var entry = {
|
var entry = {
|
||||||
slug: slug,
|
slug: slug,
|
||||||
url: '/videos/watch/' + slug,
|
url: '/w/' + slug,
|
||||||
startTime: Math.floor(cur),
|
startTime: Math.floor(cur),
|
||||||
duration: Math.floor(dur),
|
duration: Math.floor(dur),
|
||||||
pct: Math.min(99, Math.max(2, Math.round(ratio * 100))),
|
pct: Math.min(99, Math.max(2, Math.round(ratio * 100))),
|
||||||
@@ -9260,6 +9276,12 @@ try {
|
|||||||
.join('|');
|
.join('|');
|
||||||
|
|
||||||
var shelf = document.getElementById('yaktube-continue-watching-shelf');
|
var shelf = document.getElementById('yaktube-continue-watching-shelf');
|
||||||
|
if (shelf && (!shelf.isConnected || !document.body.contains(shelf))) {
|
||||||
|
try {
|
||||||
|
shelf.remove();
|
||||||
|
} catch (e) {}
|
||||||
|
shelf = null;
|
||||||
|
}
|
||||||
if (shelf) {
|
if (shelf) {
|
||||||
var curSig = shelf.getAttribute('data-render-sig');
|
var curSig = shelf.getAttribute('data-render-sig');
|
||||||
if (chipsBar && shelf.previousElementSibling !== chipsBar && chipsBar.parentElement) {
|
if (chipsBar && shelf.previousElementSibling !== chipsBar && chipsBar.parentElement) {
|
||||||
|
|||||||
Reference in New Issue
Block a user