-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix queried elements in document selector query search #2
base: main
Are you sure you want to change the base?
Conversation
My second commit c074815 makes a tweak to the feature of leaving the call when the number of attendees is lower than some threshold. The line
seemed to yield an error for me. I suspect that Google Meets has changed recently, causing the class id to be different. I replaced it with:
This fix assumes that the classID of that element won't change...this may or not be a valid assumption, but I looked through the div and there didn't seem to be a reliable way to get the number of attendees without relying on the classID--unlike the fix from the previous commit that looks at the button label. |
Don't use: Use this instead: |
Thank you, @lordofthebrain. I did not know that aria-label has a different value depending on the language. I made the update and replaced the aria-label reference line to I verified that with my changes, all 3 features still work and that the Chrome extension is still functional when I load it locally into the browser following Step 2 of these instructions from Google Support. |
Good work! For me, the extension also works again as it should be. |
@bhattcodes I discovered your Chrome extension and tried it out myself. Unfortunately it seemed to break at this line in background.js:
It looks like the Leave call button does not always have a class of "FbBiwc," and the class may have changed since you wrote this script and/or the class may change depending on region and/or how Chrome is configured. The querySelector function returns null and the ERROR message prints.
I made this adjustment to the querySelector function, replacing it with:
I believe this change will be more robust because it instead relies on the label of the button, not the class. Hopefully the label will always be "Leave call."