Format codebase with Prettier

This commit is contained in:
Enes Yakıştır
2026-09-04 12:54:11 +03:00
parent 0c98d079be
commit b952663f3a
5 changed files with 81 additions and 60 deletions
+4
View File
@@ -0,0 +1,4 @@
node_modules/
dist/
package-lock.json
pnpm-lock.yaml
+9
View File
@@ -0,0 +1,9 @@
{
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "none",
"printWidth": 120,
"arrowParens": "avoid",
"endOfLine": "auto"
}
+15 -6
View File
@@ -1,4 +1,3 @@
// 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') // 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()! // to exist so it can do .className += " browser-ok" before calling this.loadUser()!
@@ -1694,7 +1693,9 @@ try {
// Clean up stray 404 error mascot pages if on search // Clean up stray 404 error mascot pages if on search
try { try {
var errPages = document.querySelectorAll('my-error-page'); var errPages = document.querySelectorAll('my-error-page');
errPages.forEach(function(ep) { ep.remove(); }); errPages.forEach(function (ep) {
ep.remove();
});
} catch (e) {} } catch (e) {}
// Instant URL fixer: redirect legacy /search/videos to native /search // Instant URL fixer: redirect legacy /search/videos to native /search
@@ -2053,7 +2054,9 @@ try {
.catch(function () { .catch(function () {
// Fallback to local PeerTube bridge proxy // Fallback to local PeerTube bridge proxy
fetch(bridgeUrl, options) fetch(bridgeUrl, options)
.then(function (res) { return res.json(); }) .then(function (res) {
return res.json();
})
.then(function (data) { .then(function (data) {
if (typeof onSuccess === 'function') onSuccess(data); if (typeof onSuccess === 'function') onSuccess(data);
}) })
@@ -2068,7 +2071,11 @@ try {
if (!isAccountSyncEnabled() || isSyncingHistory) return; if (!isAccountSyncEnabled() || isSyncingHistory) return;
isSyncingHistory = true; isSyncingHistory = true;
callCloudSearchHistory('GET', '', null, function (data) { callCloudSearchHistory(
'GET',
'',
null,
function (data) {
isSyncingHistory = false; isSyncingHistory = false;
if (data && data.status === 'success' && Array.isArray(data.history)) { if (data && data.status === 'success' && Array.isArray(data.history)) {
if (data.history.length > 0) { if (data.history.length > 0) {
@@ -2076,9 +2083,11 @@ try {
} }
if (typeof callback === 'function') callback(); if (typeof callback === 'function') callback();
} }
}, function () { },
function () {
isSyncingHistory = false; isSyncingHistory = false;
}); }
);
} }
function saveRecentSearch(query) { function saveRecentSearch(query) {
+1 -2
View File
@@ -1,7 +1,7 @@
/* 100% Elimination of PeerTube Mobile Open-in-App & Incompatible Browser Banners */ /* 100% Elimination of PeerTube Mobile Open-in-App & Incompatible Browser Banners */
#incompatible-browser, #incompatible-browser,
.alert-light#incompatible-browser, .alert-light#incompatible-browser,
div[id="incompatible-browser"], div[id='incompatible-browser'],
.incompatible-browser, .incompatible-browser,
.mobile-msg, .mobile-msg,
my-header .mobile-msg, my-header .mobile-msg,
@@ -947,7 +947,6 @@ body.yaktube-theater-mode .video-js {
outline: none !important; outline: none !important;
} }
/* Suppress 404 Mascot and Error Page on Search results */ /* Suppress 404 Mascot and Error Page on Search results */
body:has(#yaktube-ondemand-container) my-error-page, body:has(#yaktube-ondemand-container) my-error-page,
#yaktube-ondemand-container ~ my-error-page, #yaktube-ondemand-container ~ my-error-page,