Skip to content

Commit

Permalink
support for "Speed up the process of joining meetings (Beta)"
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Zlygin committed Nov 8, 2021
1 parent d443a70 commit 3802419
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions commands.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
async function getRcvTab() {
const tabs = await chrome.tabs.query({ status: 'complete', title: 'RingCentral Video' });
const tabs = await chrome.tabs.query({ status: 'complete' });
const filteredTabs = tabs.filter(tab => tab.title.startsWith('RingCentral Video'));

if (tabs.length > 0) {
const inMeetingTab = tabs.find(tab => tab.url.includes('/conf/on/'));
if (filteredTabs.length > 0) {
const inMeetingTab = filteredTabs.find(
tab => tab.title.startsWith('RingCentral Video:')
? tab.url === 'about:blank'
: tab.url.includes('/conf/on/')
);

return inMeetingTab ?? tabs[0];
return inMeetingTab ?? filteredTabs[0];
} else {
return null;
}
Expand Down

0 comments on commit 3802419

Please sign in to comment.