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(yaknet-account): adapt hooks and community exceptions for new 2-part menu design (v1.5.12)
This commit is contained in:
@@ -176,7 +176,7 @@ try {
|
||||
document.head.appendChild(s);
|
||||
}
|
||||
|
||||
// Intercept and sanitize YakNet Account Web Component popup menu
|
||||
// Intercept and sanitize YakNet Account Web Component popup menu (v1.5.12)
|
||||
function hookYakNetAccountComponent() {
|
||||
if (typeof customElements === 'undefined') return;
|
||||
customElements
|
||||
@@ -192,18 +192,49 @@ try {
|
||||
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"]');
|
||||
var selfLinks = this.shadowRoot.querySelectorAll(
|
||||
'a[href*="yaktube.yakhub.com.tr"], .yn-app-card.yn-current, a[aria-label="YakTube"]'
|
||||
);
|
||||
selfLinks.forEach(function (a) {
|
||||
a.style.display = 'none';
|
||||
});
|
||||
// 2. In third-party PeerTube instances: Suppress entire external services grid & header to avoid community backlash
|
||||
|
||||
// 2. In third-party PeerTube instances: Suppress entire external services grid & 9-dot launcher to avoid community backlash
|
||||
if (!isOfficial) {
|
||||
var appsGrid = this.shadowRoot.querySelector('.yn-apps-grid');
|
||||
// Hide 9-dot apps button
|
||||
var appsBtn = this.shadowRoot.querySelector('#appsTriggerBtn, .yn-apps-btn');
|
||||
if (appsBtn) appsBtn.style.display = 'none';
|
||||
|
||||
// Hide apps popover
|
||||
var appsPopover = this.shadowRoot.querySelector('#yn-apps-popover, .yn-apps-popover');
|
||||
if (appsPopover) appsPopover.style.display = 'none';
|
||||
|
||||
// Legacy selectors for backwards compatibility
|
||||
var appsGrid = this.shadowRoot.querySelector('.yn-apps-grid, .yn-apps-grid-3col');
|
||||
if (appsGrid) appsGrid.style.display = 'none';
|
||||
var sectionTitle = this.shadowRoot.querySelector('#yn-services-label, .yn-section-title');
|
||||
var sectionTitle = this.shadowRoot.querySelector('#yn-services-label, .yn-section-title, .yn-apps-footer');
|
||||
if (sectionTitle) sectionTitle.style.display = 'none';
|
||||
}
|
||||
|
||||
// 3. Ensure Logout Button Hook is attached whenever account menu renders
|
||||
var shadowLogoutBtn =
|
||||
this.shadowRoot.getElementById('logoutBtn') ||
|
||||
this.shadowRoot.querySelector('.yn-logout-btn') ||
|
||||
this.shadowRoot.querySelector('button[title*="Çıkış"], button[aria-label*="Çıkış"]');
|
||||
if (shadowLogoutBtn && !shadowLogoutBtn.hasAttribute('data-yaktube-hooked')) {
|
||||
shadowLogoutBtn.setAttribute('data-yaktube-hooked', 'true');
|
||||
shadowLogoutBtn.addEventListener(
|
||||
'click',
|
||||
function (ev) {
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
performUnifiedLogout();
|
||||
},
|
||||
true
|
||||
);
|
||||
}
|
||||
}
|
||||
} catch (e) {}
|
||||
};
|
||||
@@ -564,6 +595,7 @@ try {
|
||||
'base-url="https://developer-console.yakhub.com.tr" ' +
|
||||
'login-url="/login" ' +
|
||||
'authenticated="true" ' +
|
||||
'hide-service="yaktube" ' +
|
||||
'user-name="' +
|
||||
displayName.replace(/"/g, '"') +
|
||||
'" ' +
|
||||
@@ -591,10 +623,15 @@ try {
|
||||
} else {
|
||||
var el = liveWidget.querySelector('yaknet-account');
|
||||
if (el) {
|
||||
if (el.getAttribute('authenticated') !== 'true' || el.getAttribute('user-name') !== displayName) {
|
||||
if (
|
||||
el.getAttribute('authenticated') !== 'true' ||
|
||||
el.getAttribute('user-name') !== displayName ||
|
||||
el.getAttribute('hide-service') !== 'yaktube'
|
||||
) {
|
||||
el.setAttribute('authenticated', 'true');
|
||||
el.setAttribute('user-name', displayName);
|
||||
el.setAttribute('user-email', emailStr);
|
||||
el.setAttribute('hide-service', 'yaktube');
|
||||
if (typeof el.syncStateFromAttributes === 'function') {
|
||||
el.syncStateFromAttributes();
|
||||
el.render();
|
||||
@@ -603,7 +640,9 @@ 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"]');
|
||||
var selfLinks = el.shadowRoot.querySelectorAll(
|
||||
'a[href*="yaktube.yakhub.com.tr"], .yn-app-card.yn-current, a[aria-label="YakTube"]'
|
||||
);
|
||||
selfLinks.forEach(function (a) {
|
||||
a.style.display = 'none';
|
||||
});
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "peertube-plugin-yaktube-ondemand",
|
||||
"version": "1.5.11",
|
||||
"version": "1.5.12",
|
||||
"description": "Accessible On-Demand YouTube Import, Live Streams, Smart Recommendations, Sleep Timer, Touch Gestures, Voice Assistant & A11y Engine for PeerTube",
|
||||
"main": "main.js",
|
||||
"library": "./main.js",
|
||||
|
||||
Reference in New Issue
Block a user