This commit is contained in:
2026-05-30 01:04:31 +05:30
parent 7d4149d6c9
commit 5b5d3b4977

View File

@@ -11,6 +11,7 @@
} }
html:not(.politictalk-direct-access-blocked) { html:not(.politictalk-direct-access-blocked) {
--politictalk-stage-top-inset: 96px;
--politictalk-toolbar-bottom-offset: 12px; --politictalk-toolbar-bottom-offset: 12px;
--politictalk-toolbar-mobile-scale: 0.96; --politictalk-toolbar-mobile-scale: 0.96;
} }
@@ -38,6 +39,12 @@
background-image: none !important; background-image: none !important;
} }
html.politictalk-stage-brand-inset:not(.politictalk-direct-access-blocked) #videospace {
box-sizing: border-box !important;
height: calc(100% - var(--politictalk-stage-top-inset, 96px)) !important;
top: var(--politictalk-stage-top-inset, 96px) !important;
}
.politictalk-room-logo { .politictalk-room-logo {
align-items: center; align-items: center;
display: flex; display: flex;
@@ -467,6 +474,10 @@
background-position: center center !important; background-position: center center !important;
} }
html:not(.politictalk-direct-access-blocked) {
--politictalk-stage-top-inset: 88px;
}
.politictalk-room-logo { .politictalk-room-logo {
gap: 10px; gap: 10px;
height: 48px; height: 48px;
@@ -772,6 +783,55 @@
}, 250); }, 250);
} }
function isSideToolbarOpen() {
var sideToolbar = document.getElementById('sideToolbarContainer')
|| document.querySelector('.sideToolbarContainer');
if (!sideToolbar) {
return false;
}
var rect = sideToolbar.getBoundingClientRect();
var style = window.getComputedStyle(sideToolbar);
return style.display !== 'none'
&& style.visibility !== 'hidden'
&& Number(style.opacity || 1) > 0
&& rect.width > 120
&& rect.height > 240;
}
function updatePoliticTalkStageBrandInset() {
if (directAccessBlocked || !document.body) {
document.documentElement.classList.remove('politictalk-stage-brand-inset');
return;
}
document.documentElement.classList.toggle('politictalk-stage-brand-inset', !isSideToolbarOpen());
}
function mountPoliticTalkStageBrandInset() {
updatePoliticTalkStageBrandInset();
window.addEventListener('resize', updatePoliticTalkStageBrandInset, { passive: true });
window.addEventListener('orientationchange', updatePoliticTalkStageBrandInset, { passive: true });
if (window.politicTalkStageInsetObserver || !document.body) {
return;
}
window.politicTalkStageInsetObserver = new MutationObserver(function() {
window.cancelAnimationFrame(window.politicTalkStageInsetFrame);
window.politicTalkStageInsetFrame = window.requestAnimationFrame(updatePoliticTalkStageBrandInset);
});
window.politicTalkStageInsetObserver.observe(document.body, {
attributes: true,
attributeFilter: [ 'class', 'style' ],
childList: true,
subtree: true
});
}
function isIgnoredJitsiPath(path) { function isIgnoredJitsiPath(path) {
return /^\/(?:static|images|libs|css|sounds|fonts|transcripts)\//.test(path); return /^\/(?:static|images|libs|css|sounds|fonts|transcripts)\//.test(path);
} }
@@ -1161,6 +1221,7 @@
mountDirectAccessMessage(); mountDirectAccessMessage();
mountHostHangupPolicy(); mountHostHangupPolicy();
mountMobileToolbarPositioning(); mountMobileToolbarPositioning();
mountPoliticTalkStageBrandInset();
}); });
} else { } else {
mountPoliticTalkDocumentTitle(); mountPoliticTalkDocumentTitle();
@@ -1168,6 +1229,7 @@
mountDirectAccessMessage(); mountDirectAccessMessage();
mountHostHangupPolicy(); mountHostHangupPolicy();
mountMobileToolbarPositioning(); mountMobileToolbarPositioning();
mountPoliticTalkStageBrandInset();
} }
}()); }());
</script> </script>