Is it possible to detect the activity on an opened tab from a different website?
For example, a visitor clicked a window tab from my website to example.com, I want to detect when he presses some button inside, how is it possible?
This is not possible, because as mentioned above it's a huge security risk. Imagine the possibilities this would open up for invasion of privacy.
Disclaimer notwithstanding, the only way to do this would be via a browser extension/add-on or with an application running on the same computer as the browser.