diff --git a/check_if_in_meeting.js b/check_if_in_meeting.js index a4a56c1..e6231b4 100644 --- a/check_if_in_meeting.js +++ b/check_if_in_meeting.js @@ -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') }); diff --git a/exitMeet.js b/exitMeet.js index d7e99ab..7b35aaf 100644 --- a/exitMeet.js +++ b/exitMeet.js @@ -1,8 +1,8 @@ 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); } } @@ -10,5 +10,4 @@ function exit() { var requiredParticipantToExit = parseInt(localStorage.getItem("requiredParticipantToExit")); var running = localStorage.getItem('running'); -console.log(requiredParticipantToExit, parseInt(document.querySelector('.wnPUne').innerHTML)); var exitInt = setInterval(exit, 1000); \ No newline at end of file