removed pc and more
This commit is contained in:
@@ -1387,7 +1387,7 @@ var config = {
|
|||||||
// disablePrivateChat: 'all' | 'allow-moderator-chat' | 'disable-visitor-chat',
|
// disablePrivateChat: 'all' | 'allow-moderator-chat' | 'disable-visitor-chat',
|
||||||
// },
|
// },
|
||||||
remoteVideoMenu: {
|
remoteVideoMenu: {
|
||||||
disabled: true,
|
disabled: false,
|
||||||
disableDemote: true,
|
disableDemote: true,
|
||||||
disableKick: true,
|
disableKick: true,
|
||||||
disableGrantModerator: true,
|
disableGrantModerator: true,
|
||||||
@@ -1496,7 +1496,7 @@ var config = {
|
|||||||
participantsPane: {
|
participantsPane: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
hideModeratorSettingsTab: true,
|
hideModeratorSettingsTab: true,
|
||||||
hideMoreActionsButton: true,
|
hideMoreActionsButton: false,
|
||||||
hideMuteAllButton: false
|
hideMuteAllButton: false
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -1325,58 +1325,90 @@
|
|||||||
|| normalized.indexOf('share your screen') !== -1;
|
|| normalized.indexOf('share your screen') !== -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getPoliticTalkParticipantsPane() {
|
function isPoliticTalkVisibleElement(element) {
|
||||||
|
if (!element || !element.getBoundingClientRect) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var rect = element.getBoundingClientRect();
|
||||||
|
var styles = window.getComputedStyle(element);
|
||||||
|
|
||||||
|
return rect.width > 0
|
||||||
|
&& rect.height > 0
|
||||||
|
&& styles.display !== 'none'
|
||||||
|
&& styles.visibility !== 'hidden';
|
||||||
|
}
|
||||||
|
|
||||||
|
function getPoliticTalkAudioOnlyControlRoots() {
|
||||||
var candidates = Array.prototype.slice.call(document.querySelectorAll([
|
var candidates = Array.prototype.slice.call(document.querySelectorAll([
|
||||||
'#sideToolbarContainer',
|
'#sideToolbarContainer',
|
||||||
'.sideToolbarContainer',
|
'.sideToolbarContainer',
|
||||||
'.participants-pane',
|
'.participants-pane',
|
||||||
'.participants_pane',
|
'.participants_pane',
|
||||||
'[class*="participantsPane"]'
|
'[class*="participantsPane"]',
|
||||||
|
'[role="dialog"]',
|
||||||
|
'[role="menu"]',
|
||||||
|
'[aria-modal="true"]',
|
||||||
|
'[class*="popover"]',
|
||||||
|
'[class*="Popover"]',
|
||||||
|
'[class*="context"]',
|
||||||
|
'[class*="Context"]',
|
||||||
|
'[class*="drawer"]',
|
||||||
|
'[class*="Drawer"]',
|
||||||
|
'[class*="menu"]',
|
||||||
|
'[class*="Menu"]'
|
||||||
].join(',')));
|
].join(',')));
|
||||||
|
|
||||||
return candidates.find(function(candidate) {
|
return candidates.filter(function(candidate) {
|
||||||
var text = normalizePoliticTalkText(candidate.textContent);
|
var text = normalizePoliticTalkText(candidate.textContent);
|
||||||
var rect = candidate.getBoundingClientRect();
|
var rect = candidate.getBoundingClientRect();
|
||||||
|
|
||||||
return rect.width > 120
|
return isPoliticTalkVisibleElement(candidate)
|
||||||
&& rect.height > 240
|
&& rect.width > 120
|
||||||
|
&& rect.height > 40
|
||||||
&& (
|
&& (
|
||||||
text.indexOf('meeting participants') !== -1
|
text.indexOf('meeting participants') !== -1
|
||||||
|| text.indexOf('search participants') !== -1
|
|| text.indexOf('search participants') !== -1
|
||||||
|| text.indexOf('anwesende') !== -1
|
|| text.indexOf('anwesende') !== -1
|
||||||
|| text.indexOf('mute all') !== -1
|
|| text.indexOf('mute all') !== -1
|
||||||
|| text.indexOf('alle stummschalten') !== -1
|
|| text.indexOf('alle stummschalten') !== -1
|
||||||
|
|| isPoliticTalkVideoOrScreenText(text)
|
||||||
);
|
);
|
||||||
}) || null;
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function findPoliticTalkActionContainer(element) {
|
function findPoliticTalkActionContainer(element) {
|
||||||
var current = element;
|
var current = element;
|
||||||
|
var candidate = null;
|
||||||
|
|
||||||
while (current && current !== document.body) {
|
while (current && current !== document.body) {
|
||||||
var role = normalizePoliticTalkText(current.getAttribute('role'));
|
var role = normalizePoliticTalkText(current.getAttribute('role'));
|
||||||
var text = normalizePoliticTalkText(current.textContent);
|
var text = normalizePoliticTalkText(current.textContent);
|
||||||
var rect = current.getBoundingClientRect();
|
var rect = current.getBoundingClientRect();
|
||||||
|
|
||||||
if (
|
if (current.tagName === 'BUTTON'
|
||||||
current.tagName === 'BUTTON'
|
|
||||||
|| role === 'button'
|
|| role === 'button'
|
||||||
|| role === 'menuitem'
|
|| role === 'menuitem'
|
||||||
|| (
|
|| role === 'menuitemcheckbox') {
|
||||||
isPoliticTalkVideoOrScreenText(text)
|
|
||||||
&& rect.width > 40
|
|
||||||
&& rect.width < 720
|
|
||||||
&& rect.height > 24
|
|
||||||
&& rect.height < 160
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
return current;
|
return current;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isPoliticTalkVideoOrScreenText(text)
|
||||||
|
&& rect.width > 40
|
||||||
|
&& rect.width < 760
|
||||||
|
&& rect.height > 24
|
||||||
|
&& rect.height < 150) {
|
||||||
|
candidate = current;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (candidate && (rect.width > 900 || rect.height > 220)) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
current = current.parentElement;
|
current = current.parentElement;
|
||||||
}
|
}
|
||||||
|
|
||||||
return element;
|
return candidate || element;
|
||||||
}
|
}
|
||||||
|
|
||||||
function hidePoliticTalkVideoScreenControls() {
|
function hidePoliticTalkVideoScreenControls() {
|
||||||
@@ -1384,13 +1416,24 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var pane = getPoliticTalkParticipantsPane();
|
var roots = getPoliticTalkAudioOnlyControlRoots();
|
||||||
|
|
||||||
if (!pane) {
|
if (!roots.length) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var controls = pane.querySelectorAll('button, [role="button"], [role="menuitem"], li, div, span');
|
roots.forEach(function(root) {
|
||||||
|
var controls = root.querySelectorAll([
|
||||||
|
'button',
|
||||||
|
'[role="button"]',
|
||||||
|
'[role="menuitem"]',
|
||||||
|
'[role="menuitemcheckbox"]',
|
||||||
|
'[aria-label]',
|
||||||
|
'[title]',
|
||||||
|
'li',
|
||||||
|
'div',
|
||||||
|
'span'
|
||||||
|
].join(','));
|
||||||
|
|
||||||
controls.forEach(function(control) {
|
controls.forEach(function(control) {
|
||||||
var controlText = [
|
var controlText = [
|
||||||
@@ -1412,19 +1455,24 @@
|
|||||||
|
|
||||||
if (!isSemanticAction && (
|
if (!isSemanticAction && (
|
||||||
rect.width < 40
|
rect.width < 40
|
||||||
|| rect.width > 720
|
|| rect.width > 760
|
||||||
|| rect.height < 20
|
|| rect.height < 18
|
||||||
|| rect.height > 160
|
|| rect.height > 150
|
||||||
)) {
|
)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var container = findPoliticTalkActionContainer(control);
|
var container = findPoliticTalkActionContainer(control);
|
||||||
|
|
||||||
|
if (!container || container === root || container === document.body) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
container.classList.add('politictalk-hidden-video-screen-control');
|
container.classList.add('politictalk-hidden-video-screen-control');
|
||||||
container.setAttribute('aria-hidden', 'true');
|
container.setAttribute('aria-hidden', 'true');
|
||||||
container.setAttribute('tabindex', '-1');
|
container.setAttribute('tabindex', '-1');
|
||||||
});
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function mountPoliticTalkAudioOnlyUiPolicy() {
|
function mountPoliticTalkAudioOnlyUiPolicy() {
|
||||||
|
|||||||
Reference in New Issue
Block a user