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
2
Commits
64afa7c5e9
...
v1.4.25
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f1720448c7 | ||
|
|
f73a1171c4 |
@@ -1,26 +1,37 @@
|
|||||||
|
|
||||||
// 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')
|
||||||
|
// to exist so it can do .className += " browser-ok" before calling this.loadUser()!
|
||||||
|
// Removing it from DOM causes a null pointer crash that breaks user session initialization!
|
||||||
if (typeof window !== 'undefined') {
|
if (typeof window !== 'undefined') {
|
||||||
try {
|
try {
|
||||||
window.displayIncompatibleBrowser = function () {};
|
window.displayIncompatibleBrowser = function () {};
|
||||||
var neuterIncompatible = function () {
|
var neuterIncompatible = function () {
|
||||||
var el = document.getElementById('incompatible-browser');
|
var el = document.getElementById('incompatible-browser');
|
||||||
if (el) {
|
if (el) {
|
||||||
|
if (!el.classList.contains('browser-ok')) {
|
||||||
el.classList.add('browser-ok');
|
el.classList.add('browser-ok');
|
||||||
|
}
|
||||||
el.style.setProperty('display', 'none', 'important');
|
el.style.setProperty('display', 'none', 'important');
|
||||||
if (el.parentNode) el.parentNode.removeChild(el);
|
el.style.setProperty('visibility', 'hidden', 'important');
|
||||||
|
el.style.setProperty('height', '0px', 'important');
|
||||||
|
el.style.setProperty('width', '0px', 'important');
|
||||||
|
el.style.setProperty('opacity', '0', 'important');
|
||||||
|
el.style.setProperty('pointer-events', 'none', 'important');
|
||||||
|
} else {
|
||||||
|
try {
|
||||||
|
var dummy = document.createElement('div');
|
||||||
|
dummy.id = 'incompatible-browser';
|
||||||
|
dummy.className = 'browser-ok';
|
||||||
|
dummy.style.display = 'none';
|
||||||
|
(document.body || document.documentElement).appendChild(dummy);
|
||||||
|
} catch (e) {}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
neuterIncompatible();
|
neuterIncompatible();
|
||||||
if (document.readyState === 'loading') {
|
if (document.readyState === 'loading') {
|
||||||
document.addEventListener('DOMContentLoaded', neuterIncompatible);
|
document.addEventListener('DOMContentLoaded', neuterIncompatible);
|
||||||
}
|
}
|
||||||
try {
|
|
||||||
var incompObserver = new MutationObserver(function () {
|
|
||||||
neuterIncompatible();
|
|
||||||
});
|
|
||||||
incompObserver.observe(document.documentElement || document.body, { childList: true, subtree: true });
|
|
||||||
} catch (e) {}
|
|
||||||
setInterval(neuterIncompatible, 1000);
|
setInterval(neuterIncompatible, 1000);
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
}
|
}
|
||||||
@@ -368,15 +379,18 @@ try {
|
|||||||
var isAuth = !!token && !!uName;
|
var isAuth = !!token && !!uName;
|
||||||
|
|
||||||
if (headerRight) {
|
if (headerRight) {
|
||||||
var defaultLoginLink = headerRight.querySelector('my-login-link, a[href*="/login"], .login-button');
|
|
||||||
var liveWidget = headerRight.querySelector('#yaknet-header-account-widget');
|
var liveWidget = headerRight.querySelector('#yaknet-header-account-widget');
|
||||||
|
|
||||||
if (isAuth) {
|
if (isAuth) {
|
||||||
// 1. AUTHENTICATED: Hide native login link, Show YakNet Account Profile Menu
|
// 1. AUTHENTICATED: Add class to body & Hide ALL native login links completely
|
||||||
if (defaultLoginLink) {
|
document.body.classList.add('yaktube-user-logged-in');
|
||||||
defaultLoginLink.style.display = 'none';
|
document
|
||||||
defaultLoginLink.setAttribute('aria-hidden', 'true');
|
.querySelectorAll('my-login-link, a[href*="/login"], .login-button, [class*="login-link"]')
|
||||||
}
|
.forEach(function (btn) {
|
||||||
|
btn.style.setProperty('display', 'none', 'important');
|
||||||
|
btn.setAttribute('aria-hidden', 'true');
|
||||||
|
btn.setAttribute('tabindex', '-1');
|
||||||
|
});
|
||||||
|
|
||||||
if (!liveWidget) {
|
if (!liveWidget) {
|
||||||
var widgetWrap = document.createElement('div');
|
var widgetWrap = document.createElement('div');
|
||||||
@@ -449,18 +463,19 @@ try {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 2. GUEST / NOT LOGGED IN:
|
// 2. GUEST / NOT LOGGED IN:
|
||||||
// A. Physically remove any <yaknet-account> widget from DOM to guarantee zero shadow DOM duplicate buttons
|
document.body.classList.remove('yaktube-user-logged-in');
|
||||||
if (liveWidget) {
|
if (liveWidget) {
|
||||||
liveWidget.remove();
|
liveWidget.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
// B. Ensure PeerTube's native login link is the ONLY single accessible login element
|
document
|
||||||
if (defaultLoginLink) {
|
.querySelectorAll('my-login-link, a[href*="/login"], .login-button, [class*="login-link"]')
|
||||||
defaultLoginLink.style.display = '';
|
.forEach(function (btn) {
|
||||||
defaultLoginLink.removeAttribute('aria-hidden');
|
btn.style.display = '';
|
||||||
|
btn.removeAttribute('aria-hidden');
|
||||||
|
btn.removeAttribute('tabindex');
|
||||||
|
|
||||||
var loginAnchor =
|
var loginAnchor = btn.tagName.toLowerCase() === 'a' ? btn : btn.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 ile Giriş Yap');
|
loginAnchor.setAttribute('title', 'YakNet ile Giriş Yap');
|
||||||
@@ -471,7 +486,7 @@ try {
|
|||||||
loginAnchor.textContent = 'YakNet ile Giriş Yap';
|
loginAnchor.textContent = 'YakNet ile Giriş Yap';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -571,7 +586,13 @@ try {
|
|||||||
|
|
||||||
injectYakNetSSO();
|
injectYakNetSSO();
|
||||||
|
|
||||||
// Replace all login buttons labels and titles
|
// Check auth status for login button rendering
|
||||||
|
var tokenVal = localStorage.getItem('access_token');
|
||||||
|
var userVal = localStorage.getItem('username');
|
||||||
|
var isAlreadyAuth = !!tokenVal && !!userVal;
|
||||||
|
|
||||||
|
if (!isAlreadyAuth) {
|
||||||
|
// Replace all login buttons labels and titles ONLY for guests
|
||||||
document
|
document
|
||||||
.querySelectorAll(
|
.querySelectorAll(
|
||||||
'my-login-link, a[href*="/login"], a[title*="Giriş sayfasına git"], [aria-label*="Giriş sayfasına git"]'
|
'my-login-link, a[href*="/login"], a[title*="Giriş sayfasına git"], [aria-label*="Giriş sayfasına git"]'
|
||||||
@@ -599,6 +620,7 @@ try {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Aggressively remove generic Framasoft Open-in-App / Play Store banners
|
// Aggressively remove generic Framasoft Open-in-App / Play Store banners
|
||||||
document
|
document
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "peertube-plugin-yaktube-ondemand",
|
"name": "peertube-plugin-yaktube-ondemand",
|
||||||
"version": "1.4.23",
|
"version": "1.4.25",
|
||||||
"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",
|
||||||
|
|||||||
Reference in New Issue
Block a user