FocusPrivacy stops particularly invasive websites from seeing if you're on a different application or tab. Once installed, the extension simply starts working– no configuration required. FocusPrivacy is open source software. You can view the code here: https://github.com/AngeloD2022/FocusPrivacy