I hereby claim:
- I am lyallcooper on github.
- I am lyall (https://keybase.io/lyall) on keybase.
- I have a public key ASDY_vkvIT8r_2x1gJWDzWuxuCfVPhTXqZOGb0ncxlJauwo
To claim this, I am signing this object:
| #!/usr/bin/osascript | |
| -- Use this script in conjunction with a tool like xbar (https://github.com/matryer/xbar) to add | |
| -- an audio/video mute status indicator to the menu bar. | |
| -- | |
| -- ATTN: Make sure View > Developer > "Allow JavaScript from Apple Events" is enabled in Chrome | |
| set separator to "\n---\n" | |
| tell application "Google Chrome" |
| tell application "Google Chrome" | |
| repeat with w in (windows) | |
| set i to 1 -- tabs are one indexed | |
| repeat with t in (tabs of w) | |
| if URL of t starts with "https://meet.google.com" then | |
| tell tab i of w | |
| -- These selectors may be unstable, but seem to work well now | |
| execute javascript "document.querySelectorAll('[data-is-muted]')[1].click()" | |
| set muted to (execute javascript "document.querySelectorAll('[aria-label=\"Turn on microphone (⌘ + d)\"]').length === 1") | |
| if muted then |
I hereby claim:
To claim this, I am signing this object: