fdsafs
This commit is contained in:
@@ -562,7 +562,7 @@
|
||||
? `style="--author-banner: url('/a/${bannerFile}'); --author-banner-position: ${bannerPos === 'center' ? 'center top' : (bannerPos || 'center top')}; --author-banner-size: ${(bannerSz && bannerSz !== 'cover') ? bannerSz : '100% auto'}; --author-banner-repeat: no-repeat;"`
|
||||
: '';
|
||||
|
||||
const isAnonGuest = window.f0ckSession?.guest_anonymize && !window.f0ckSession?.logged_in;
|
||||
const isAnonGuest = window.f0ckSession?.is_anonymized ?? (window.f0ckSession?.guest_anonymize && !window.f0ckSession?.logged_in);
|
||||
const effectiveBannerStyle = isAnonGuest ? '' : bannerStyle;
|
||||
const authorAvatarHtml = isAnonGuest
|
||||
? `<span class="sidebar-avatar-link"><img src="/a/default.png" class="sidebar-avatar" loading="eager" /></span>`
|
||||
@@ -1031,13 +1031,31 @@
|
||||
let lastBoundMode = typeof window.activeMode !== 'undefined' ? window.activeMode : null;
|
||||
|
||||
const getCurrentMimeFilter = () => {
|
||||
const allowed = window.f0ckSession?.is_anon && Array.isArray(window.f0ckSession?.anon_permissions?.allowed_mimes) ? window.f0ckSession.anon_permissions.allowed_mimes : null;
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
const qMime = urlParams.get('mime');
|
||||
if (qMime !== null) return qMime.trim();
|
||||
let qMime = urlParams.get('mime');
|
||||
if (qMime !== null) {
|
||||
qMime = qMime.trim();
|
||||
if (allowed) {
|
||||
const parts = qMime.split(',').filter(m => allowed.includes(m));
|
||||
return parts.length > 0 ? parts.join(',') : (allowed.length < 5 ? allowed.join(',') : '');
|
||||
}
|
||||
return qMime;
|
||||
}
|
||||
const cookieMime = document.cookie.split('; ').find(row => row.startsWith('mime='));
|
||||
if (cookieMime) {
|
||||
const val = cookieMime.split('=')[1];
|
||||
if (typeof val === 'string') return decodeURIComponent(val).trim();
|
||||
if (typeof val === 'string') {
|
||||
const cMime = decodeURIComponent(val).trim();
|
||||
if (allowed) {
|
||||
const parts = cMime.split(',').filter(m => allowed.includes(m));
|
||||
return parts.length > 0 ? parts.join(',') : (allowed.length < 5 ? allowed.join(',') : '');
|
||||
}
|
||||
return cMime;
|
||||
}
|
||||
}
|
||||
if (allowed && allowed.length < 5) {
|
||||
return allowed.join(',');
|
||||
}
|
||||
return '';
|
||||
};
|
||||
@@ -1176,7 +1194,7 @@
|
||||
displayTitle = `${videoKey}`;
|
||||
}
|
||||
|
||||
const isAnonGuest = window.f0ckSession?.guest_anonymize && !window.f0ckSession?.logged_in;
|
||||
const isAnonGuest = window.f0ckSession?.is_anonymized ?? (window.f0ckSession?.guest_anonymize && !window.f0ckSession?.logged_in);
|
||||
const authorName = isAnonGuest ? 'anonymous' : (video.display_name || video.username);
|
||||
const userColorStyle = (!isAnonGuest && video.username_color) ? `style="color: ${escapeHtml(video.username_color)}"` : '';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user