Skip to content

Commit

Permalink
Update issue fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
ProgrammerGaurav committed Jun 15, 2021
1 parent ad55600 commit 28411af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions check_if_in_meeting.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ window.onbeforeunload = function (e) {
};
var url = window.location.hostname;
if (url.includes('meet')) {
if (document.getElementsByClassName('wnPUne').length > 0) {
if (document.getElementsByClassName('uGOf1d').length > 0) {
var meet = true;
} else {
var meet = false;
}
}
if (document.getElementsByClassName('wnPUne').length > 0) {
if (document.getElementsByClassName('uGOf1d').length > 0) {
chrome.runtime.sendMessage({
meet: meet,
noOfParticipants: document.querySelector('.wnPUne').innerHTML,
noOfParticipants: document.querySelector('.uGOf1d').innerHTML,
running: localStorage.getItem('running')
});

Expand Down
5 changes: 2 additions & 3 deletions exitMeet.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
function exit() {
if (running) {
if (requiredParticipantToExit > parseInt(document.querySelector('.wnPUne').innerHTML)) {
if (requiredParticipantToExit > parseInt(document.querySelector('.uGOf1d').innerHTML)) {
localStorage.removeItem('running');
document.querySelector('.GaONte').click()
document.querySelector('button[aria-label="Leave call"]').click()
clearInterval(exitInt);
}
}
}

var requiredParticipantToExit = parseInt(localStorage.getItem("requiredParticipantToExit"));
var running = localStorage.getItem('running');
console.log(requiredParticipantToExit, parseInt(document.querySelector('.wnPUne').innerHTML));
var exitInt = setInterval(exit, 1000);

0 comments on commit 28411af

Please sign in to comment.