Anyone managed to detect when browser tabs are closed and respond to the closing of said tab? #3663
-
Basically, I'm locking to automate toggling of things if a google meet tab is closed in Brave browser. Any suggestions for things that have worked for you? |
Beta Was this translation helpful? Give feedback.
Answered by
megalithic
Aug 14, 2024
Replies: 1 comment 3 replies
-
at first you can check if the tab is already open. other idea: I would try a javascript inside the browser listening to tab closing (maye with |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's what I ended up with.. basically watching tab count and the domain existing or not.. hacky, but works.
https://github.com/megalithic/dotfiles/blob/e7179ae395c10514e6106687e040b6631c22480f/config/hs/contexts/com.brave.Browser.nightly.lua?plain=1#L12-L29