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(a11y): domain-lock yaknet menu and suppress recursive self-links in yaknet-account
This commit is contained in:
@@ -151,6 +151,40 @@ try {
|
||||
document.head.appendChild(s);
|
||||
}
|
||||
|
||||
// Intercept and sanitize YakNet Account Web Component popup menu
|
||||
function hookYakNetAccountComponent() {
|
||||
if (typeof customElements === 'undefined') return;
|
||||
customElements.whenDefined('yaknet-account').then(function () {
|
||||
var YakNetAccount = customElements.get('yaknet-account');
|
||||
if (!YakNetAccount || !YakNetAccount.prototype || YakNetAccount.prototype._yaktubeSanitizerHooked) return;
|
||||
YakNetAccount.prototype._yaktubeSanitizerHooked = true;
|
||||
var originalRender = YakNetAccount.prototype.render;
|
||||
if (typeof originalRender === 'function') {
|
||||
YakNetAccount.prototype.render = function () {
|
||||
originalRender.call(this);
|
||||
try {
|
||||
if (this.shadowRoot) {
|
||||
var isOfficial = isOfficialYakTubeServer();
|
||||
// 1. In YakTube: Suppress redundant/recursive link to YakTube inside services list
|
||||
var selfLinks = this.shadowRoot.querySelectorAll('a[href*="yaktube.yakhub.com.tr"]');
|
||||
selfLinks.forEach(function (a) {
|
||||
a.style.display = 'none';
|
||||
});
|
||||
// 2. In third-party PeerTube instances: Suppress entire external services grid & header to avoid community backlash
|
||||
if (!isOfficial) {
|
||||
var appsGrid = this.shadowRoot.querySelector('.yn-apps-grid');
|
||||
if (appsGrid) appsGrid.style.display = 'none';
|
||||
var sectionTitle = this.shadowRoot.querySelector('#yn-services-label, .yn-section-title');
|
||||
if (sectionTitle) sectionTitle.style.display = 'none';
|
||||
}
|
||||
}
|
||||
} catch (e) {}
|
||||
};
|
||||
}
|
||||
}).catch(function () {});
|
||||
}
|
||||
hookYakNetAccountComponent();
|
||||
|
||||
// Silent background SSO Probe Engine
|
||||
function initSilentSSOProbe() {
|
||||
var token = localStorage.getItem('access_token');
|
||||
@@ -440,7 +474,7 @@ try {
|
||||
btn.setAttribute('tabindex', '-1');
|
||||
});
|
||||
|
||||
if (!liveWidget) {
|
||||
if (!liveWidget && isOfficialYakTubeServer()) {
|
||||
var widgetWrap = document.createElement('div');
|
||||
widgetWrap.id = 'yaknet-header-account-widget';
|
||||
widgetWrap.className = 'yaknet-header-widget';
|
||||
@@ -476,6 +510,9 @@ try {
|
||||
} else {
|
||||
headerRight.prepend(widgetWrap);
|
||||
}
|
||||
} else if (liveWidget) {
|
||||
if (!isOfficialYakTubeServer()) {
|
||||
liveWidget.remove();
|
||||
} else {
|
||||
var el = liveWidget.querySelector('yaknet-account');
|
||||
if (el) {
|
||||
@@ -490,6 +527,12 @@ try {
|
||||
}
|
||||
|
||||
if (el.shadowRoot) {
|
||||
// Direct DOM safety: remove self-link on polling cycle too
|
||||
var selfLinks = el.shadowRoot.querySelectorAll('a[href*="yaktube.yakhub.com.tr"]');
|
||||
selfLinks.forEach(function (a) {
|
||||
a.style.display = 'none';
|
||||
});
|
||||
|
||||
var shadowLogoutBtn =
|
||||
el.shadowRoot.getElementById('logoutBtn') ||
|
||||
el.shadowRoot.querySelector('.yn-logout-btn') ||
|
||||
@@ -509,6 +552,7 @@ try {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 2. GUEST / NOT LOGGED IN:
|
||||
document.body.classList.remove('yaktube-user-logged-in');
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "peertube-plugin-yaktube-ondemand",
|
||||
"version": "1.4.32",
|
||||
"version": "1.4.33",
|
||||
"description": "Accessible On-Demand YouTube Import, Live Streams, Smart Recommendations and A11y Engine for PeerTube",
|
||||
"main": "main.js",
|
||||
"library": "./main.js",
|
||||
|
||||
Reference in New Issue
Block a user