How can detect the minimze window?

Just like the .resize? But when click on that button?

Thanks!

I don’t believe it’s possible, although it is possible to detect when a user’s mouse goes out of the page, e.g. https://github.com/beeker1121/exit-intent-popup

It doesn’t work for me in chrome, maybe its because im on linux?:
DeepinScreenshot_select-area_20190630141203 :

I think the Page Visibility API has somewhat decent support.

setTimeout(()=> {
  console.log(document.hidden)
},3000)
1 Like