I wrote a quick script in response to a tweet from Brittany Smith in which she sought a solution for all the leftover Zoom tabs she had open in Safari after following a link that launched the Zoom app. I’m not in enough Zoom calls on a daily basis for this to be a real issue for me, but it was an easy enough script to whip up. I’m sharing it in case more people than just Brittany are in the same boat.
My kingdom for an automation tool to close every Zoom browser tab I forgot to close in Safari. @ttscoff ?
— Brittany Sith (@addliberator) November 5, 2020
It should be noted that there’s a Safari extension called Zoom In that purports to provide a very elegant solution to this issue. I only hacked this together when Brittany said that the extension wasn’t working for her. Rather than bother trying to test it myself, I just wrote an AppleScript to handle it.
This will only work with Safari, but could easily be adapted to Chrome (and Brave, and probably Edge). It will never work with Firefox. Well, I shouldn’t say never, maybe someday Mozilla will get its AppleScript act together…
Here’s the script. You can trigger it from LaunchBar or Alfred, or use Automator to create a Workflow, Service, or App bundle. I’ll leave it at that. It’s working in my initial testing, but if you try it out and run into issues, please leave a comment or Tweet at me and I’ll update the gist with any fixes.