News for hackers. Stuff that matters.
Re:Web pages can now detect when Chrome’s window is covered ... by purple_ducks on Thursday March 28, 2019 @01:31PM (#19514473)
Seems like a good time for the various OSes to have a blacklist of programs who shouldn't be able to access this info - chrome being the first program to add to list.
Re:Web pages can now detect when Chrome’s window is covered ... by marssaxman on Thursday March 28, 2019 @03:06PM (#19515455)
Once upon a time, I genuinely thought of a browser as a "user-agent", as hinted in the HTTP header; a tool I could use to reach out into the world.

I have increasingly had to abandon that idea and treat browsers as potentially hostile incursions into my computer, since browser makers seem determined to prioritize the needs of web developers by granting them access into my machine without really bothering to get my consent. Why do I have to use third-party add-ons that break browser default behaviors in order to get back to a comfortable security state? This suggests that my interests and those of the browser makers, especially Google, are not well aligned, and that really reduces the usefulness of the web for me.

Re:Web pages can now detect when Chrome’s window is covered ... by tartoran on Thursday March 28, 2019 @12:32PM (#19513799)
Yuck. Is this a move to help advertisers pause ads when we switch to a different tab? Imagine adds not going away until you watch them...

What's the official use case for this?

Re:Web pages can now detect when Chrome’s window is covered ... by pssflops on Thursday March 28, 2019 @01:20PM (#19514360)
It is already possible to detect whether the current tab is being viewed or not (window.onfocus) in javascript.
Re:Web pages can now detect when Chrome’s window is covered ... by backspace_ on Thursday March 28, 2019 @12:49PM (#19514007)
Or more ways to pause any kind of count down timers.
Re:Web pages can now detect when Chrome’s window is covered ... by hackersword on Thursday March 28, 2019 @12:58PM (#19514120)
Can an extension like tampermonkey block/highjack events from a page?
Re:Web pages can now detect when Chrome’s window is covered ... by sli on Thursday March 28, 2019 @02:10PM (#19514905)
Yes. jQuery's `.unbind()` can do it easily, but doing it in vanilla JS is a bit different[1]. You essentially clone the node and swap the clone into the original node's spot. This also clears all event handlers for any child nodes (so, swap out <body> with a clone and you're set).

[1]: https://stackoverflow.com/a/19470348/13876